Skip to content

Don't set document.currentScript for <script type="module"> #997

Closed

Description

@domenic

Per discussions in web components F2F, we don't like this API anymore and want to consider a better one for new stuff like modules and scripts-inside-shadow-DOM.

/cc @jonco3 @ajklein @Constellation @DigiTec

Activity

  1. smaug---- commented on Apr 5, 2016

    @smaug----

    How should the relevant events work in this case. For shadow DOM we can mark the events scoped, but that doesn't really affect to the behavior in light DOM.

  2. domenic commented on Apr 5, 2016

    @domenic
    MemberAuthor

    beforescriptexecute and afterscriptexecute, you mean? They seem somewhat unrelated to me... modules would still have them.

  3. smaug---- commented on Apr 5, 2016

    @smaug----

    Don't know why those are unrelated, but anyhow, something to keep in mind at least.

  4. added a commit that references this issue on Apr 5, 2016
    ff9cf1d
  5. annevk commented on Apr 6, 2016

    @annevk
    Member

    @domenic I think we should not dispatch those either. I think the idea with those events is that you can then grab the script (using document.currentScript and manipulate it before it gets executed. The events are also controversial per #943 so only Gecko would implement support for them presumably...

  6. added 3 commits that reference this issue on Apr 11, 2016
    33ea3ae
    456c115
    177d30d
  7. added a commit that references this issue on Apr 15, 2016
    6918282
  8. deleted a comment from p5hzehxa on Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions