Modularity: ES6 modules vs. HTML imports vs. asm.js
guybedford at googlemail.com
Sat Jun 8 12:49:04 PDT 2013
Will it be possible to ensure that HTML imports can allow the specific ES6
loader to be specified (just as I asked about script tags in my previous
HTML imports using ES6 modules makes a lot of sense, because script tag
duplication causes unnecessary script re-execution otherwise (imagine
jquery being a <script> tag on many imports - if it is an imported module
its code is executed only once).
So the main issue I'm worried about is that there needs to be some way to
indicate that a custom loader should be used all the way down the import
window['my-es6-loader'] = new Loader( ... );
<link rel="import" loader="my-es6-loader" href="/imports/something.html">
is not enough because imports within the imported document would then
revert to the system loader. Not sure how this gets solved.
In terms of the build tooling, these will now need to include the scope of
both systems, but this seems rather inevitable at this point.
On 8 June 2013 07:33, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
> HTML imports are importing HTML, not JS. Coordination is always good,
> but I don't know what that would entail here.
> asm.js modules have some specific needs, and it may or may not be able
> to use ES6 modules. I'll let Dave speak to that.
> On Sat, Jun 8, 2013 at 9:56 AM, Axel Rauschmayer <axel at rauschma.de> wrote:
> > With Web Components, we also get HTML Imports . This seems like yet
> > another modularity construct on the web. Would it make sense to
> > this with ES6 modules? I’m also hoping/assuming that asm.js will
> > use ES6 modules(?)
> >  http://www.w3.org/TR/2013/WD-html-imports-20130514/
> > --
> > Dr. Axel Rauschmayer
> > axel at rauschma.de
> > home: rauschma.de
> > twitter: twitter.com/rauschma
> > blog: 2ality.com
> > _______________________________________________
> > es-discuss mailing list
> > es-discuss at mozilla.org
> > https://mail.mozilla.org/listinfo/es-discuss
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss