Replies: 1 comment
-
|
I haven't looked at this in detail, but I notice that you close the HTML doc, then send the h2 element to fill the slot, whereas in the templ example, the slot contents are sent before the end html tag. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Does anyone know how to recreate https://templ.guide/server-side-rendering/ streaming#declarative-shadow-dom using just the Go standard library?
I've tried to first render the main template which includes the
<template shadowrootmode="open">tag with the slot, callFlushon the response writer and then render the template which should fill in that slot.That second templates ends up being rendered outside of the
htmltag. it looks like if the slot content isn't rendered as a sibling of the template the template slot isn't filled.Does anyone here have any experience trying to stream content using shadow DOM and HTTP?
Thank you very much.
EDIT: Minimal reproducible example of my attempt:
Could probably remove the flushing and sleeping as the issue comes only from how the HTML is handled.
Beta Was this translation helpful? Give feedback.
All reactions