Re: [heycam/webidl] Should we "check if we can run script" before calling callbacks? (#993)

I agree it's not clear-cut. It's a combination of:

- Firefox gets away with it.

- Chrome and Safari don't run Web IDL handlers, which are potentially more common.

- Anything involving detached frames is a mess and unlikely to be something web developers can rely on. E.g. inside your callback the properties of the global object will mostly be nulled out or throw exceptions, in inconsistent ways across browsers.

I think the main risk would be if there's a site which is trying to do "JS-spec-only" things (e.g. Node.js-isomorphic code) on detached iframes, and using promises to schedule things there. But such a site wouldn't work in Firefox, so I'm hoping such cases are rare...

Separately from my intuition on whether this is compatible, I also think it's desirable, as part of the ongoing efforts of folks like @xharaken and his team to make detached iframes as GC-able as possible.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/993#issuecomment-868701676

Received on Friday, 25 June 2021 16:57:23 UTC