Question

I am interested in upcoming standard called "Shadow DOM" that hasn't default browser support at this time. But how about server-side emulation? I mean something like custom tags in template engine but with internal CSS and JavaScript namespacing that will be compatible with W3C Working Draft so when browsers gonna start to support it - template engine will poop with shadow-dom instead of preprocessed plain html. Also it will be useful if browsers will have different shadow-dom standard understanding. Is there any implementations and is it reasonable at all?

Was it helpful?

Solution

You can use a client-side JavaScript library, such as this one, to emulate Shadow DOM in browsers that do not have native Shadow DOM implementations.

Since the effects of Shadow DOM are seen when manipulating the DOM, a server-side emulation of Shadow DOM doesn’t make a whole lot of sense unless your server is generating pages by manipulating DOM — most server-side frameworks use templating.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top