-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Don't update document.currentScript for module scripts #1000
Conversation
See #997 (comment) for feedback. |
ff9cf1d
to
33ea3ae
Compare
Updated |
I think if the module script is the reentrant script we'd want it to be set to null too, no? Or can that never happen with module scripts? |
Are you talking about updating the non-normative note? |
I meant that rather than only updating it for classic scripts, we should update it for module scripts too, but just set it to null, and once the script is executed restore the previous value. |
Oh, interesting. I felt like just ignoring currentScript would be better, but that's probably reasonable behavior too. I think reentrancy can happen for |
We should probably also add a note explaining why it's null. |
33ea3ae
to
456c115
Compare
Pushed the new set-to-null semantics. I'm not sure what kind of note we could add, besides "because we don't like this API any more". I'd welcome a suggestion. |
I guess we could remove the "domintro" box, mark it "// historical" in IDL, and add "This API fell out of fashion as it globally exposes script and SVG script element. The JavaScript community is looking for a way to identify these without making them globally available." as a note underneath the normative definition. |
I think that's not a great idea verbatim, as whatever we come up with will only work for module scripts anyway. Maybe... keep domintro, mark it |
"classic scripts in a document only" then if we're mentioning shadow trees. But that seems fine. Do you want me to patch things up? |
I can do it when I get to work. |
456c115
to
6ddf1fa
Compare
Added a fixup commit |
Closes #997.