Re:Enhance WASM: Back End Agnostic SSR for Web Components
by 1shooner on Thursday April 11, 2024 @12:26PM
(#40003956)
>I don't believe there's a way to send down a working web component from the server without accompanying client-side logic.
Do you mean declarative shadow dom? That landed in FF 123, so I think it's now available on all major browsers.
Re:Enhance WASM: Back End Agnostic SSR for Web Components
by niutech on Friday April 12, 2024 @07:38PM
(#40018763)
Yes, this is Pure HTML Out-of-Order Streaming without JS and it works in every web browser: https://github.com/niutech/phooos
My confusion is that a web component by definition has to run client-side javascript. You're either (a) using javascript to port content from a template into your custom element, or (b) using javascript to attach a shadow dom to a custom element. I could be wrong about this, but I don't believe there's a way to send down a working web component from the server without accompanying client-side logic.