Re: [css-houdini-drafts] [worklets] There is no way to catch "throw" or "unhandledrejection" (#975)

Worklets aren't Workers; they share a similar API surface and are conceptually close, but are quite different things in impl. You can't (currently) post messages to them, for instance.

Whether they live on the main thread or not is an impl detail; how many worklets live in a single global realm is also an impl detail. This is very different from Workers, which have unique Realms. So, we can't reasonably register a single global error/rejection handler, as the error/rejection could come from any of the unpredictable set of the other worklets currently sharing a global with you.

Potentially each individual Worklet registration could take such handlers, but I'm not sure what the impl costs would be.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/975#issuecomment-568803248 using your GitHub account

Received on Tuesday, 24 December 2019 21:19:37 UTC