Closed
Description
What type of issue is this?
Other
What information was incorrect, unhelpful, or incomplete?
The phrasing "The closed read-only property of the WebTransport interface returns a promise that resolves when the transport is closed." does not make it clear whether this actually triggers the transport to be closed, or just resolves whenever it does happen to close. The wording seems to imply the latter, but the JavaScript snippet/example with the function name closeTransport
seems to imply that .closed
is a getter which itself triggers closing:
async function closeTransport(transport) {
// Respond to connection closing
try {
await transport.closed;
console.log(`The HTTP/3 connection to ${url} closed gracefully.`);
} catch (error) {
console.error(`The HTTP/3 connection to ${url} closed due to ${error}.`);
}
}
What browsers does this problem apply to, if applicable?
No response
What did you expect to see?
Slightly more clear wording.
Did you test this? If so, how?
No.
Can you link to any release notes, bugs, pull requests, or MDN pages related to this?
No response
Do you have anything more you want to share?
No response
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/WebTransport/closed
MDN metadata
MDN page report details
- Query:
api.WebTransport.closed
- Report started: 2024-10-11T14:13:09.321Z