-
Notifications
You must be signed in to change notification settings - Fork 163
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
Elaborate on Exposed=* advice #1119
Comments
This one escaped throughout the cracks, it seems! Anyhow, from our perspective (TC39), it doesn't matter much what API are included, the only thing we really care about is that everything is forgeable as specified (configurable and deletable) from the global object. Portability is a no-goal of the ShadowRealm proposal, meaning we know there will be differences between various environments, and that's fine. As for the Errors, and errors propagation between incubator realm and shadow realm, we will put something together to explain our proposal, trying to make it coherent. As for the particular question above, my personal opinion is that MouseEvent should not be there because there is no DOM inside the ShadowRealm, nor the concept of a UI, so that one will just simply not work. |
It seems like so far the set of APIs chosen to be included inside shadow realms has been limited to interfaces (rather than to methods or properties defined in the global property), plus I don't think such methods have been considered that much, and maybe this is not the right issue (since as mentioned |
@andreubotella that I don't understand very well, but I certainly expect that methods like |
@caridy Currently there doesn’t seem to be a way for such Web IDL operations to be coherent for a ShadowRealm global object. Has this already been addressed somewhere (assuming these are intended to be included)? It seems like this would need new spec text to become possible, but I didn’t find anything. |
Good call @bathos. When making these functions available on a ShadowRealm's global, we'll need to make sure this global object is acceptable as the receiver, and more importantly, that in the absence of a receiver it's this ShadowRealm's global object being used as fallback receiver and not the principal realm's global object. |
Ok, I understand now. Few notes thought:
|
This sounds like relevant realm behavior. I think you’re correct that Chrome using relevant realm for the returned Promise there is a bug — however using the relevant realm is intended for e.g. the |
Given tc39/proposal-shadowrealm#401 I think we should get rid of |
I don't see the connection; can you elaborate? I think tc39/proposal-shadowrealm#401 (comment) is fair. |
It seems better to err on the side of exposing to a reviewed set of realms, and by default not expose it to new realms. |
I've tried to create a coherent proposal for this in w3ctag/design-principles#509. (It hasn't had any comments yet from the TAG.) Hopefully this addresses Anne's request in the OP: "I think it would help if we listed the principles or criteria that were used to select the initial set of interfaces." Please let me know what you think. |
Currently we have this:
I think it would help if we listed the principles or criteria that were used to select the initial set of interfaces. Ideally specific enough that it's clear why
ErrorEvent
is included andMouseEvent
andreportError()
are excluded. As that would help a lot with carrying this forward consistently into the future.(Context: whatwg/html#7591.)
cc @Ms2ger @domenic @smaug---- @leobalter @caridy @mhofman
The text was updated successfully, but these errors were encountered: