Referencing modules loaded by HTML Imports.
ian at hixie.ch
Mon Aug 18 14:06:42 PDT 2014
On Mon, 18 Aug 2014, John Barton wrote:
> On Mon, Aug 18, 2014 at 10:43 AM, Ian Hickson <ian at hixie.ch> wrote:
> > To avoid overly spamming the list I've coallesced my responses to
> > various threads over the weekend into this one e-mail.
> I really think this makes the discussion more difficult to follow and
> certainly more difficult to participate in.
Apologies, I'm not familiar with this lists' conventions.
> > > > Now, in the main page, you reference the HTML import:
> > > >
> > > > <link rel=import href="foo.html">
> > > >
> > > > Now how would you refer to the modules? We can't have #b refer to
> > > > it, since the scope of IDs is per-document, and the import has a
> > > > separate document.
> > >
> > > Separate document implies separate JS global: each needs its own
> > > Loader. So the rest of the questions aren't needed.
> > HTML imports definitely need to expose modules across documents. Are
> > you saying this requires changes to ES6 to support? What changes would
> > we need?
> You need to give more details about such requirements. What is the
> runtime relationship between Imports and other documents? I assume the
> Import is providing some state that ends up in the importer but then you
> are saying these are different documents.
HTML imports and regular documents share a Window object, but have
separate Documents objects. You can find out more about them here:
They are "shortly" to be merged into the HTML spec proper; doing so is
mostly just blocked on my work trying to integrate HTML with ES6's module
loader so that we don't end up with multiple redundant dependency systems.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the es-discuss