Skip to content

Commit e507a08

Browse files
authored
Enhance fragment include explainer with additional notes
Added notes on client-side sanitization and observability of latency and errors in HTML streaming.
1 parent c94cd7d commit e507a08

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

fragment-include-explainer.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ While this opens up a lot of new options, this has a few limitations that were s
77
1. A patch *always* streams, and there is no declarative way to make it apply in one batch when desired.
88
2. A patch is interleaved within the original response, requiring the server to multiplex content from different sources.
99
3. A patch cannot be independently sanitized. It inherits the safety features of its embedder.
10-
4. The template is still part of a normal HTML stream, so there's no particular observability to latency and errors.
10+
11+
A few relevant missing things, addition to `<template for>`:
12+
1. Client-side sanitization is only possible when inserting markup using script. HTML is unsafe by default, unless it is JS-inserted.
13+
2. There is no standard way to observe latency and errors when streaming different parts of HTML
1114

1215
## Proposed solution
1316

0 commit comments

Comments
 (0)