-
Notifications
You must be signed in to change notification settings - Fork 67
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
Normative: Clarify text about host added properties #301
Conversation
spec.html
Outdated
This specification does not recommend any specific addition. | ||
In the Web embedding, HTML and WebIDL will specify which | ||
interfaces are included. The Web Platform and Web-like | ||
environments may decide to include `setTimeout`, `EventTarget`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK setTimeout is IO. And as I explained in #284 I strongly against the host being able to add things into the realm without being able to have a clean version. This also hurts the API to be cross-platform safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just an editorial note and we can remove the example.
Anyway, please keep the discussion to the respective issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is a clean way to describe the changes due to the feedback in #284 (comment) . We will need to follow up with details in the HTML side at some point, but I don't see why that should block Stage 3 (though it will block shipping in web browsers).
platform capabilities with no authority to cause side effects such | ||
as I/O or mutation of values that are shared across different | ||
realms within the same host environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with no authority to cause side effects such as I/O or mutation of values that are shared across different realms
This is not enough for the SES requirement.
Imagine the host provide a counter { [[Get]]: () => #counter, [[Set]]: (val) => #counter = val }
property on the Realm's global object, this provides a shared global state within the Realm (not shared across different realms). It provides a communication channel in the different compartments within the same realm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I read the text to cover that case--I see the code sample as a value shared across realms, at a high level. I guess we just need to iterate on the wording so that it's maximally clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If #counter
is a host-defined pre-realm internal state, it will be a mutable state within the Realm and passes the current spec text but violate the SES requirement.
Something known that would block shipping in web browsers should of course block stage 3 - since the point of stage 3 is to ship it in web browsers. |
My guess is that a stage 3 would facilitate implementation without holding on what properties are added through HTML. This clears path for experimenting in this integration, while providing a fairly stable contract of a spec candidate from the ECMAScript side. |
I don't think this is how we've been doing things. We have frequently continued to iterate on HTML integration PRs after Stage 3 in recent proposals. test262 is also usually required for browsers to ship, but it's not a Stage 3 requirement. I think we should leave it up to the HTML folks whether they feel like things are complete enough on their end to go to Stage 3. |
Ref #284