Re: [w3c/webcomponents] HTML Modules (#645)

Hi, I updated the [summary](https://gist.github.com/TakayoshiKochi/fdc1e72d4fd0bbdaf61e7f23779e9139) of this thread + some backgrounds.

Here's executive summary:

So far, most people seem to be interested in HTML modules (or whatever it will be called) as a way to construct an inert DOM tree from HTML in JavaScript. It is not limited for the use case of Web Components, but could be useful for various applications.

It comes in two flavors:

a) Extend ES6 module syntax: e.g. `import x from './foo.html' as Document;`.
b) Use ES6 template literal to instantiate from inlined HTML string.

@rniwa's https://github.com/w3c/webcomponents/issues/645#issuecomment-310811695, is the most informative comment of both. The two could be separate things, but rendering engine's implementation can share the internal pipeline (network stream or string -> HTML parser -> DOM tree) for both (and even the comment above includes an idea how to do so).

@justinfagnani's https://github.com/w3c/webcomponents/issues/645#issuecomment-320712449 has implementation of b) + https://github.com/whatwg/html/issues/2254.

Of course details should be fleshed out, but if there is no significant opposition against this direction, we can move forward.

And in case of Blink, if these can cover use cases of HTML Imports, we have no worry about deprecating HTML Imports and new primitives can polyfill HTML Imports if needed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/645#issuecomment-322402746

Received on Tuesday, 15 August 2017 07:58:21 UTC