Re: [whatwg/dom] Declarative Shadow DOM (#510)

The markup is the same as the `<template shadowroot>` versions of the proposals, so the parasability is literally exactly the same. We'd need a polyfill anyway. Standardization helps, but isn't a sure thing. For instance, do we know that crawlers properly _don't_ consider template content now? Conventions, even if not in a W3C spec can help.

> when is your snipped executed?

I think sophisticated enough JS can pretty reliably emulate what the browser would do. The browser can't stream contents into the shadow roots, so it'll have to be at least chunked, if not done in one shot if the whole page is in a shadow root. Flickering can be solved as the browser would, by processing in a bottom-up up order, so that all content is still in a template until the top-level template is hydrated.

> Falls short for no JS, or slow networks, or any other similar scenario. In does case, the content will not be consumable.

If the snippet is inlined with the page, it'll be fine for slow networks. For no JS situations it won't render, but the content will be there for parsing. Renderers tend to have JS though. This is the situation we'd be in if this was a standard not implemented in every browser or crawler: we'd need a JS polyfill.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/510#issuecomment-371244981

Received on Wednesday, 7 March 2018 18:56:13 UTC