- From: Ryosuke Niwa <notifications@github.com>
- Date: Wed, 05 Oct 2022 00:16:58 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 5 October 2022 07:17:11 UTC
> > @mfreed7 : in terms of the implementation complexity of streaming, you can take a look at the PR: [WebKit/WebKit#4822](https://github.com/WebKit/WebKit/pull/4822) > > Looks pretty clean, and very close to what I imagined. Just replace `.content` with `.fragmentForInsertion` everywhere, and hope you didn't miss any corner cases. Yeah, the key trick I used is to still creating & pushing a template element into the stack of open elements. This allows the rest of HTML parser to behave as if a regular template element existed, and we'd stream content into the template element's document fragment like a normal template element; it's just that the document fragment is a shadow root in this case. It's significantly simpler than introducing a special mode of parser where the content is being streamed to shadow root without any template element to speak of. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/831#issuecomment-1268044474 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/831/1268044474@github.com>
Received on Wednesday, 5 October 2022 07:17:11 UTC