v150 · HTML parser · streaming use case
Streaming Use Case
This demo streams real HTML from the server with literal <?target data?> processing instructions in later chunks. The browser parser, not JavaScript, decides whether those bytes become ProcessingInstruction DOM nodes.
processing-instruction probe
Waiting for stream...
streamed byte evidence
Waiting for stream...
what this proves
- The streamed route is served as
text/htmland flushes multiple response chunks over time. - Later chunks contain literal processing-instruction syntax such as
<?stream-start name="recommendations"?>. - The probe checks
Node.PROCESSING_INSTRUCTION_NODE,innerHTMLparsing,DOMParserparsing, and the live iframe DOM. It does not check unrelated APIs. - Unsupported browsers keep rendering the visible content, but the parser report shows that no PI nodes survived.
server shape
controller.enqueue("<main>...fast shell...</main>");
// later in the same text/html response
controller.enqueue(`<?stream-start name="recommendations" phase="placeholder"?>`);
controller.enqueue("<section>Recommendations ready</section>");
controller.enqueue(`<?stream-end name="recommendations"?>`);
references
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗