-
Notifications
You must be signed in to change notification settings - Fork 4
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
Open Question: can we restrict hosts to ensure their getIntrinsic is a superset of 262's? #5
Comments
Maybe this could be expressed as an invariant? All intrinsics available when user code starts executing must be reachable through |
This does raise another question: what is the developer expectation for |
That invariant is exactly what I was thinking when I wrote this late last night, thank you. I would like the developer expectations to be that it includes everything, and since web folks strongly insist that developers don't know or want to know the difference between 262 and HTML, i assume they would naturally want to provide their own getIntrinsic that adds Web APIs. However, I'm not sure how 262 could mandate that, since "intrinsic" is a 262 concept. |
The main problem I see is the notation difference between the specs. The developer would have to be able to refer to (and discover) a "built-in" without knowing which spec it's defined in. |
This reminds me of another thing I'd been thinking about - the |
A quick reading of Web IDL seem to show that all objects follow a similar structure with unique interface names (which may or may not be exposed), and a way to map that to ECMAScript objects, so it seem possible for the Web IDL spec to define how definitions translate to |
Currently we do not allow the |
A host may need to be able to provide their own getIntrinsic function - in particular, if they want to provide additional intrinsics (such as web or node builtins).
Should we, and can we, require hosts' getIntrinsic to be an extension of 262's? Meaning, they would be forced to only provide added intrinsics, and not to remove any?
(this could be done in a similar fashion as the current spec intrinsic syntax - something like, "
eval(x) === getIntrinsic(x)
for all stringsx
that are an identifier/member expression, as if they were evaluated prior to user code".How would this interact with 402's replacement of some 262 builtin functions? 402 of course could provide their own getIntrinsic, but theirs would likely fail the requirement as phrased above.
Another acceptable answer to the title question is "no".
The text was updated successfully, but these errors were encountered: