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

@Jamesernator Okay so I understand that nothing in a `<template>` will be rendered. But that may be a big problem. Say Disqus (3rd party hosted comments section) creates a `<disqus-section>` custom element for use. Now browsers that don't support DSD (which is currently all of them) will see none of the content on SSR render. (yes there is the `if (!this.shadowRoot) { // gen dom }` option but that is liable to CLS and only works on [browsers with WC support](https://caniuse.com/custom-elementsv1)). 

However if I render a WC with light DOM form content then it is still rendered in IE (and to the other 6% of users that use browsers without WC support). And that form can just work as regular a regular `<form>` using the browser form submission behaviour. It's not the best UX but it's better than nothing. 

When using slots w/ light DOM on a non DSD supported browser it only gets worse as now the content is there but not under the correct structure which could cause nasty styling issues. `:not(:defined)` is not a solution as [`:not` support](https://caniuse.com/css-not-sel-list) is mutually exclusive with the browsers that it would be needed on.

I appreciate the efforts of this proposal but think this backwards compatibility issue needs more light. This issue is not present in frameworks and framework specific components. Until browser usage is in the high 90s is it really feasible to use DSD if you care about progressive enhancement for older browsers. I guess this issue has little effect when WCs are used as edge nodes and are below the fold...

-- 
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/831#issuecomment-770284346

Received on Saturday, 30 January 2021 21:36:10 UTC