iframe-based deferred rendering with tokenized isolation layer
This commit is contained in:
parent
1c361de610
commit
3ec65b9a0f
8 changed files with 308 additions and 90 deletions
|
|
@ -12,7 +12,6 @@ export interface StreamOptions {
|
|||
export function chunked() {
|
||||
const chunks = new ChunkedStream<string>();
|
||||
const encoder = new TextEncoder();
|
||||
|
||||
return {
|
||||
chunks,
|
||||
stream: new ReadableStream<Uint8Array>({
|
||||
|
|
@ -53,8 +52,8 @@ export async function createDataStream(
|
|||
return {
|
||||
blob: stream,
|
||||
chunks,
|
||||
close: chunks.close,
|
||||
error: chunks.error,
|
||||
close: () => chunks.close(),
|
||||
error: (e) => chunks.error(e),
|
||||
response: new Response(stream, {
|
||||
headers: {
|
||||
"Content-Type": options.contentType,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue