css-houdini

Can't import css houdini paint js file

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-07 07:01:09
问题 I have a React/Electron app, where I'm trying to use the new CSS Houdini paint() function (as demonstrated in this page). In my project's index.html file I have added a script tag with the paintWorklet addModule() function as shown: <script> CSS.paintWorklet.addModule('../src/ResultDisplay/DefaultResultDisplay/testPaint.js'); </script> Then in that testPaint.js file I have essentially a copy of what's shown in that blog post: registerPaint( "testPaint", class { paint(ctx, geom) { console.log(

Can't import css houdini paint js file

不羁的心 提交于 2021-01-07 06:59:19
问题 I have a React/Electron app, where I'm trying to use the new CSS Houdini paint() function (as demonstrated in this page). In my project's index.html file I have added a script tag with the paintWorklet addModule() function as shown: <script> CSS.paintWorklet.addModule('../src/ResultDisplay/DefaultResultDisplay/testPaint.js'); </script> Then in that testPaint.js file I have essentially a copy of what's shown in that blog post: registerPaint( "testPaint", class { paint(ctx, geom) { console.log(