From 6bb6a9952cb4d3a5daf72943eb230b1ba6e2e23a Mon Sep 17 00:00:00 2001 From: Bashamega Date: Fri, 26 Dec 2025 19:45:18 +0200 Subject: [PATCH 1/2] Migrate Web Transport --- inputfiles/overridingTypes.jsonc | 40 ----------------------------- inputfiles/patches/webtransport.kdl | 18 +++++++++++++ src/build/patches.ts | 1 + 3 files changed, 19 insertions(+), 40 deletions(-) diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 27ae7ec0d..2a0b0bd8a 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -453,33 +453,6 @@ }, "overrideIndexSignatures": [] }, - "WebTransport": { - "methods": { - "method": { - "createUnidirectionalStream": { - "signature": { - "0": { - "subtype": { - "type": "WritableStream" - } - } - } - } - } - } - }, - "WebTransportBidirectionalStream": { - "properties": { - "property": { - "readable": { - "type": "ReadableStream" - }, - "writable": { - "type": "WritableStream" - } - } - } - }, "Document": { "methods": { "method": { @@ -1695,19 +1668,6 @@ ] } }, - "WebTransportDatagramDuplexStream": { - "properties": { - "property": { - // https://github.com/w3c/webtransport/pull/638 removed this but browsers still has this - "writable": { - "name": "writable", - "type": "WritableStream", - "readonly": true, - "mdnUrl": "https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/writable" - } - } - } - }, "HTMLTableRowElement": { "properties": { "property": { diff --git a/inputfiles/patches/webtransport.kdl b/inputfiles/patches/webtransport.kdl index 82ec9e50b..7bd958395 100644 --- a/inputfiles/patches/webtransport.kdl +++ b/inputfiles/patches/webtransport.kdl @@ -11,3 +11,21 @@ removals { member waitUntilAvailable // No implementation as of 2025-12. } } + +interface WebTransport { + method createUnidirectionalStream signatureIndex=0 { + type { + type WritableStream + } + } +} + +interface WebTransportBidirectionalStream { + property readable type=ReadableStream + property writable type=WritableStream +} + +interface WebTransportDatagramDuplexStream { + // https://github.com/w3c/webtransport/pull/638 removed this but browsers still have this + property writable type=WritableStream readonly=#true mdnUrl="https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/writable" +} diff --git a/src/build/patches.ts b/src/build/patches.ts index eea32a0de..d90bdaa92 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -286,6 +286,7 @@ function handleProperty(child: Node): DeepPartial { ...handleTyped(typeNodes, child.properties?.type), ...optionalMember("readonly", "boolean", child.properties?.readonly), ...optionalMember("deprecated", "string", child.properties?.deprecated), + ...optionalMember("mdnUrl", "string", child.properties?.mdnUrl), }; } From b444ca3b8378ab763d2aa142413f99fdde68a5e4 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Fri, 26 Dec 2025 19:57:47 +0100 Subject: [PATCH 2/2] Add implementation notes for WebTransport interface Add comments about Gecko's implementation of WebTransport. --- inputfiles/patches/webtransport.kdl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inputfiles/patches/webtransport.kdl b/inputfiles/patches/webtransport.kdl index 7bd958395..0c3469e35 100644 --- a/inputfiles/patches/webtransport.kdl +++ b/inputfiles/patches/webtransport.kdl @@ -13,6 +13,7 @@ removals { } interface WebTransport { + // Only Gecko implements the return type as SendStream as of 2025-12 method createUnidirectionalStream signatureIndex=0 { type { type WritableStream @@ -21,6 +22,7 @@ interface WebTransport { } interface WebTransportBidirectionalStream { + // Only Gecko implements readable/writable as Receive/SendStream as of 2025-12 property readable type=ReadableStream property writable type=WritableStream }