You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, two HTML imports will stomp on each other if they happen to declare the same globals. Each import should IMHO be in its own module and should export what it wants to export.
The text was updated successfully, but these errors were encountered:
I think that would be weird, personally. I hope we are able to come up with reasonable semantics for both classic and module scripts, inside an import.
I don't think that's what this bug is about. I think the author is suggesting a way for an imported document to define exports, so that instead of calling customElements.define in a script within the import, you might instead export a custom element class that the consumer could then call customElements.define with.
Skipping past the hard parts of integrating the HTML import and ES module systems, let's say that was figured out, it would be nice if you could do something like:
Title: Scripts in HTML Imports should be scoped to the import (treat imports as script modules) (bugzilla: 27836)
Migrated from: https://www.w3.org/Bugs/Public/show_bug.cgi?id=27836
comment: 0
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=27836#c0
Ian 'Hixie' Hickson wrote on 2015-01-15 00:34:48 +0000.
Right now, two HTML imports will stomp on each other if they happen to declare the same globals. Each import should IMHO be in its own module and should export what it wants to export.
The text was updated successfully, but these errors were encountered: