I have just been watching this talk about the Shadow Dom by +Angelina Fabbro and although it is for things that I have read about and played with before something seems to have just clicked in my head (where else would it click?).
I love the idea of making re-usable components but always thought that scoped JS and CSS would be enough, why add on this layer of complexity with the Shadow Dom? I looked at it as just another way to hide spam content. A way to display something without Google being able to see it so you can market a page the best way possible but when you visit it you just seem spam, everywhere >_>
I have just stopped this video at 8:49, the thing that has clicked for me is that the Shadow Root is then placed into the Host Node… The rendering of the Shadow Node was done by the Shadow Root!
I’m sure I mentioned this to +Paul Irish or +Addy Osmani before but I always thought it would be neat to give Front-end devs a way to do what Flash devs have been doing for a while… cacheAsBitmap…. Tell the browser that this section shouldn’t be updated, no matter what.
Am I right in thinking that each Shadow Dom could be rendered and cached this way and hence save on Render times? keeping the FPS down and only having to render when its Child Nodes become *dirty*…
There may not be a way to get the browser to cache this just yet, but having an attribute we can change for this would be most useful. Having the browser *cough*chrome*cough* cache these automatically would be useful too. Who knows the structure of our pages better than us right? Why can’t we say when to and not to update a frame?
Either way that has just made Components a lot more tempting in my books.