I’m going to explain Server Side rendering in Part 2.
Rob Dodson

If you were to use DOM emulation on the server and then send down the resulting HTML then the custom element would not exist in the browser’s DOM and you would therefore lose all client-side behavior (e.g., no lifecycle hooks) and just be left with an inert DOM subtree for the custom element. In order to make the custom element dynamic you would then need to replace the server-rendered DOM subtree with the actual custom element via JavaScript. Is that the planned approach to support server-side rendering or am I missing something? It would be nice if the spec allowed pre-rendered HTML for custom elements for fast page loads while also allowing the client-side code to directly pick up where the server left off without any hacks. If you want to wait to address that in your follow up post then that’s fine, but I am curious.

Show your support

Clapping shows how much you appreciated Patrick Steele-Idem’s story.