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

@AshleyScirra,

Yeah, your proposal seems to be a lot more appealing, when it comes to external references.

But I do like the idea that there can also be some official way of  inlining html templates, and style templates (and maybe other resources) in a way that the browser will optimize around, and which tooling can work with.  With support for constants.  Colating resources, in other words.  If all these things happened I would be a happy camper.

To the specifics of your proposal, I would hope that there would be a way to apply the stylesheet to the [ShadowDom context](https://www.smashingmagazine.com/2016/12/styling-web-components-using-a-shared-style-sheet/#link-relstylesheet-in-the-shadow-dom) from which the reference was made, but I can also see the benefits of applying global styles too.

I'm also wondering if your proposal could be extended to support dynamic import() of HTML .  Custom Elements already have a way to know when they are finished loading (customElements.whenDefined) but if all you want to do is embed a template html fragment into other html, knowing when the reference is ready would be quite useful, without blocking other pieces of the page.



-- 
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-320705462

Received on Monday, 7 August 2017 16:04:01 UTC