Skip to content

Commit 1915432

Browse files
Bashamegasaschanaz
andauthored
Migrate Web Transport (#2324)
Co-authored-by: saschanaz <saschanaz@users.noreply.github.com>
1 parent 2f9a18a commit 1915432

File tree

3 files changed

+21
-40
lines changed

3 files changed

+21
-40
lines changed

inputfiles/overridingTypes.jsonc

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -453,33 +453,6 @@
453453
},
454454
"overrideIndexSignatures": []
455455
},
456-
"WebTransport": {
457-
"methods": {
458-
"method": {
459-
"createUnidirectionalStream": {
460-
"signature": {
461-
"0": {
462-
"subtype": {
463-
"type": "WritableStream"
464-
}
465-
}
466-
}
467-
}
468-
}
469-
}
470-
},
471-
"WebTransportBidirectionalStream": {
472-
"properties": {
473-
"property": {
474-
"readable": {
475-
"type": "ReadableStream"
476-
},
477-
"writable": {
478-
"type": "WritableStream"
479-
}
480-
}
481-
}
482-
},
483456
"Document": {
484457
"methods": {
485458
"method": {
@@ -1695,19 +1668,6 @@
16951668
]
16961669
}
16971670
},
1698-
"WebTransportDatagramDuplexStream": {
1699-
"properties": {
1700-
"property": {
1701-
// https://github.com/w3c/webtransport/pull/638 removed this but browsers still has this
1702-
"writable": {
1703-
"name": "writable",
1704-
"type": "WritableStream",
1705-
"readonly": true,
1706-
"mdnUrl": "https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/writable"
1707-
}
1708-
}
1709-
}
1710-
},
17111671
"HTMLTableRowElement": {
17121672
"properties": {
17131673
"property": {

inputfiles/patches/webtransport.kdl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,23 @@ removals {
1111
member waitUntilAvailable // No implementation as of 2025-12.
1212
}
1313
}
14+
15+
interface WebTransport {
16+
// Only Gecko implements the return type as SendStream as of 2025-12
17+
method createUnidirectionalStream signatureIndex=0 {
18+
type {
19+
type WritableStream
20+
}
21+
}
22+
}
23+
24+
interface WebTransportBidirectionalStream {
25+
// Only Gecko implements readable/writable as Receive/SendStream as of 2025-12
26+
property readable type=ReadableStream
27+
property writable type=WritableStream
28+
}
29+
30+
interface WebTransportDatagramDuplexStream {
31+
// https://github.com/w3c/webtransport/pull/638 removed this but browsers still have this
32+
property writable type=WritableStream readonly=#true mdnUrl="https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/writable"
33+
}

src/build/patches.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ function handleProperty(child: Node): DeepPartial<Property> {
291291
...handleTyped(typeNodes, child.properties?.type),
292292
...optionalMember("readonly", "boolean", child.properties?.readonly),
293293
...optionalMember("deprecated", "string", child.properties?.deprecated),
294+
...optionalMember("mdnUrl", "string", child.properties?.mdnUrl),
294295
};
295296
}
296297

0 commit comments

Comments
 (0)