-
Notifications
You must be signed in to change notification settings - Fork 1.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
Audit host hook points in HTML #3147
Comments
If we mark host hook AOs as such, we can also lint for unused AOs. |
There are a couple different things that are ad hoc about the realm creation hook: (1)
IHDR then has ad hoc steps to 'access' these customizations, e.g.:
We could make this less ad hoc by giving IHDR two parameters (e.g., global and thisValue), and have HTML pass its customizations as objects (or Or is there something important about not creating the objects in question until after the first 6 steps of IHDR? (2) If you're thinking that IHDR should be converted to a callback-style hook, I think that might be undoing some of PR #1597. (But maybe not.) |
This is exactly the kind of thing I wanted an audit to turn up, and this solution sounds like the right direction to me.
Yes, this seems important to elaborate on. |
At least in the web platform, all objects are expected to be associated with a realm, so creating an object before the realm exists is somewhat inconvenient. |
I'm surprised. I thought engines were not tracking the realm in which objects were created, only functions. |
I believe that is technically allowed by ecma-262, but not on the web |
For the most part, HTML integration into ecma262 is done via host hooks. Host hooks are used very much like an embedder passing custom callbacks to an engine. However, some hook points are more ad-hoc, like realm creation.
We should discuss whether these ad-hoc patterns are acceptable editorially, or if we should introduce more formal hook points.
The text was updated successfully, but these errors were encountered: