Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api.WebTransport.closed - wording is a bit ambiguous #36308

Open
josephrocca opened this issue Oct 11, 2024 · 0 comments
Open

api.WebTransport.closed - wording is a bit ambiguous #36308

josephrocca opened this issue Oct 11, 2024 · 0 comments
Labels
Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!

Comments

@josephrocca
Copy link

josephrocca commented Oct 11, 2024

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
@queengooborg queengooborg transferred this issue from mdn/browser-compat-data Oct 11, 2024
@github-actions github-actions bot added Content:WebAPI Web API docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Oct 11, 2024
@Josh-Cena Josh-Cena added help wanted If you know something about this topic, we would love your help! and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!
Projects
None yet
Development

No branches or pull requests

2 participants