[webcomponents] [Shadow]: Declarative Shadow DOM (bugzilla: 28441) (#71)

Title: [Shadow]: Declarative Shadow DOM (bugzilla: 28441)

Migrated from: https://www.w3.org/Bugs/Public/show_bug.cgi?id=28441

----
comment: 0
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=28441#c0
*Dimitri Glazkov* wrote on 2015-04-08 15:49:50 +0000.

From: https://lists.w3.org/Archives/Public/public-webapps/2015AprJun/0052.html

"Mostly for performance it would be nice if
the composed tree could be serialized and cached. That way first
render only requires HTML and CSS with JavaScript kicking in at the
end. We reasoned it might not be too hard to add something like
<shadowroot> given our experience with <template>. The only difference
would be that <shadowroot> itself would also not be appended to the
tree and that the DocumentFragment nee ShadowRoot is associated with
"its parent"."

----

comment: 1
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=28441#c1
*Dimitri Glazkov* wrote on 2015-04-08 16:21:10 +0000.

Here's a fairly simple implementation of this using custom elements and templates: http://jsbin.com/xuheb/4/edit

I think this is a great example of:

a) using type extensions to avoid more hard-coded parsing behaviors

b) extensible web in action -- no need to wait on spec/browsers to ship this

c) custom element upgrades being helpful in avoiding additional tree traversals and deferring running of the script until whenever you actually need the tree.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/71

Received on Monday, 25 May 2015 08:49:36 UTC