-
Notifications
You must be signed in to change notification settings - Fork 9
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
Non-normative layering fix for #59 #62
Conversation
fa4cafe
to
2cf3d2a
Compare
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 think you should still present this, as even if not technically normative some delegates prefer layering changes to go throu plenary.
ca89a8d
to
7487599
Compare
88f79a2
to
4e4ade6
Compare
@guybedford I was thinking about what the host implementation of this hook would look like, and it introduces much more complexity than the current spec because it forces us to answer the question of "given a user-created It might be better to keep this 1:1 with the current spec and instead have a |
6c798aa
to
2226a1f
Compare
Thanks @nicolo-ribaudo for the excellent point here. Yes let's match the existing behaviour for now and tackle the larger questions for ESM source phase layering in due course. |
6bb03e7
to
88ca7c5
Compare
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 think this wording is clearer.
Co-authored-by: Luca Casonato <hello@lcas.dev>
This addresses the implementation feedback in #59 that expecting an internal slot on objects that might not be defined in ECMA-262 poses implementation difficulties and that a new host hook layering would be the preferable approach to the spec boundaries.
This change satisfies the branding requirement, while resolving the implementation feedback.
The new host hook provided to implement this new check is
HostGetModuleSourceName
which takes a module source object and returns its string value, throwing if it is not a module source object.The strong branding of
toStringTag
is then retained by calling this hook.