4 ms·
If I remember correctly some WHATWG members are trying to settle on a syntax for declarative shadow DOM[1]. I personally wouldn’t hold my breath for it though,
by runarberg 5y ago
If I remember correctly some WHATWG members are trying to settle on a syntax for declarative shadow DOM[1]. I personally wouldn’t hold my breath for it though, I don’t know how enthusiastic the rest of WHATWG is about this.
In the meantime I would look for technology which applies server side rendering to your web components.
1: https://web.dev/declarative-shadow-dom/ https://web.dev/declarative-shadow-dom/
- jimmont 5y agoWhy server side rendering? Content that needs rendering just put in the tree and target a slot. My perception was this is the best practice. I haven't used the lit included intl translation and am curious if and how these concerns work.
- runarberg 5y agoDoesn’t that still require JavaScript? As I understand it (and I might not; I don’t have servers to do SSR) people want SSR for two reasons. a) To allow users that don’t have JavaScript for some reason to at get good UX, and b) to prevent the styles from kicking in after the initial render. There are ways to author your components in a way that fixes (b), but I’m not aware of any technique other then SSR that will fix (a).
- e111077 5y agoI don't think anyone is really targeting JS-less users. It's mostly for faster first renders and the examples of JS-less is to typically show something has been SSR'd and not yet hydrated / not loading anything that isn't needed for first render.
- jopsen 5y agoIsn't SSR also attractive because it's simple? For things that aren't web apps, like blog/wiki/docs/news-site the primary content is text + images + links. Is it not attractive to avoid JS where not needed? And only use it for the tiny bits that really do need it.
- eyelidlessness 5y ago> I personally wouldn’t hold my breath for it though, I don’t know how enthusiastic the rest of WHATWG is about this. DSD is already shipping in Chrome 90 and Edge 91. I suspect that will put pressure on others to either adopt or continue with the standardization process until it addresses their outstanding concerns.
- deleted 5y ago[deleted]