-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS paint worklet (Houdini) causes generic error #2083
Comments
Inside you're paintWorklet, how have you declared For myself, the error appears when
Changing
Hope this helps! |
@HannahTa Hi! Thanks for taking a look. I already use that method :-( Here's how my whole file looks: class CrossPainter {
static get inputProperties() {
return ['--border-thin', '--color-dark'];
}
paint(ctx, size, props) {
ctx.lineWidth = props.get('--border-thin').value;
ctx.strokeStyle = props.get('--color-dark').toString();
ctx.beginPath();
ctx.moveTo(0, 0);
ctx.lineTo(size.width, size.height);
ctx.stroke();
ctx.beginPath();
ctx.moveTo(size.width, 0);
ctx.lineTo(0, size.height);
ctx.stroke();
}
}
registerPaint('image-cross', CrossPainter); |
I'm encountering this same issue. When the browser attempts to fetch the worklet script the parcel development server is responding with the I am using a paint worklet in the same project as a service worker and parcel is handling the service worker absolutely fine but failing to handle the paint worklet. In case it's useful information I'm using a fairly standard TypeScript setup in my project and here's my environment:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. |
I can't believe I'm saying this but inlining it worked for me: |
🐛 bug report
Houdini paint worklet causes cryptic
Uncaught (in promise) DOMException: The user aborted a request.
error🎛 Configuration (.babelrc, package.json, cli command)
package.json
Babel
Just using the default config
🤔 Expected Behavior
My CSS
paintWorklet
should be loaded and applied in myapp.js
file (see below).😯 Current Behavior
Note the error points to the
index.html
file:💁 Possible Solution
Removing the worker/Houdini stopped the error, but obviously that's not ideal ;-) that's just how I know it was the provided code that triggered it (under Expected behavior)
🔦 Context
My code depends on paint workers in places. It's an experimental app but I was hoping Parcel could help with bundling.
💻 Code Sample
(Note that the worklet path should point from the root, not the JS file (
app.js
) in this case. I tried using the~
syntax, but that didn't help.)🌍 Your Environment
The text was updated successfully, but these errors were encountered: