From bf1f172978ed1f22e9fec0ed70fb456ebc32f9fe Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 19 Aug 2025 23:06:20 -0400 Subject: [PATCH] Why not a phase? --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 185942f..d05979b 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,15 @@ ReadableStream is part of the WHATWG [Streams](https://streams.spec.whatwg.org), See discussion in Issue https://github.com/styfle/proposal-import-bytes/issues/3 +### Why not a phase? + +This proposal does not attempt to introduce a new phase like the [source](https://github.com/tc39/proposal-source-phase-imports) or [asset](https://github.com/tc39/proposal-asset-references) proposals. + +* A new phase would require a syntax change to JavaScript +* A new phase would cause `Sec-Fetch-Dest` to be script instead of empty + +See discussion in Issue https://github.com/tc39/proposal-import-bytes/issues/16 + ### Why `type: bytes`? The `bytes()` method is familiar to those using [Response.bytes()](https://developer.mozilla.org/en-US/docs/Web/API/Response/bytes) or newer [Blob.bytes()](https://developer.mozilla.org/en-US/docs/Web/API/Blob/bytes) which both return Uint8Array.