Re: [HTML Imports]: what scope to run in

On Sat, Nov 23, 2013 at 1:51 AM, Jonas Sicking <jonas@sicking.cc> wrote:
> One thing that we did discuss but that I think we never reached a
> conclusion on was if imported HTML documents need to block <module>
> tags in the main document. Otherwise there's a risk that named modules
> introduced by the imported HTML document won't be known at the time
> when name resolution happens in the main document. Whether this is a
> problem or not depends on now this name resolution works. I think this
> is still an outstanding question to resolve.

Some further thoughts.

ES6 modules does not have a way for sub-modules to add additional
names. Only top-level <module> elements can introduce new named
modules.

Following that logic, a HTML-imported document should not be allowed
to introduce additional names. I.e. they can use <module> elements,
but those <module> elements should not be able to add new named
modules. Only the top-level HTML document should be able to use
<module> to introduce names.

If we do that, then that might reduce the race-problems around names
that we were discussing.

/ Jonas

Received on Wednesday, 4 December 2013 22:22:30 UTC