Skip to content
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

[worklets] Fetching and invoking a nondeterministic worklet script #423

Closed
asajeffrey opened this issue Jun 30, 2017 · 2 comments
Closed

Comments

@asajeffrey
Copy link

What should happen if a nondeterminstic worklet script is fetched and invoked (https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script)? For example, a paint worklet which returns random properties, arguments or alpha flag. The script will be evaluated multiple time (once per global), and the different executions might return different results, leaving the worklet in an inconsistent state.

@bfgeek
Copy link
Contributor

bfgeek commented Jun 30, 2017

So this is covered by the spec, but might be worth adding a note where we've got the "paint definition" and "document paint definition"...

https://drafts.css-houdini.org/css-paint-api/#registering-custom-paint Step 21.3.3
https://drafts.css-houdini.org/css-paint-api/#invoke-a-paint-callback Step 2.1.2

Basically if the scripts report different things, it'll wipe out the paint definition in the document, and it shouldn't be used from then onwards.

Does that make sense?

@asajeffrey
Copy link
Author

Ah, that makes sense, I hadn't spotted that bit of the spec, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants