Skip to content

Clarify WebTransport datagram writable support#44317

Open
KirtiRamchandani wants to merge 2 commits into
mdn:mainfrom
KirtiRamchandani:docs/webtransport-datagram-writable-note
Open

Clarify WebTransport datagram writable support#44317
KirtiRamchandani wants to merge 2 commits into
mdn:mainfrom
KirtiRamchandani:docs/webtransport-datagram-writable-note

Conversation

@KirtiRamchandani

Copy link
Copy Markdown
Contributor

Description

Adds explicit deprecated/non-standard markers and compatibility notes beside the WebTransport datagram examples that use WebTransportDatagramDuplexStream.writable.

Motivation

The WebTransport.datagrams page can show Baseline support for the datagrams property while the outgoing datagram example uses writable, which has separate compatibility data, is deprecated, is non-standard, and is not supported in Safari. The added notes make that distinction visible where readers encounter the example.

Additional details

The same outgoing datagram example appears on the WebTransportDatagramDuplexStream overview, so this updates both pages consistently.

Related issues and pull requests

Fixes #44273

Tests

  • Prettier 3.8.3 check on the two touched pages
  • MarkdownLint CLI 0.22.1 with MDN config on the two touched pages
  • git diff --check -- files/en-us/web/api/webtransport/datagrams/index.md files/en-us/web/api/webtransportdatagramduplexstream/index.md

@KirtiRamchandani KirtiRamchandani requested a review from a team as a code owner June 1, 2026 09:19
@KirtiRamchandani KirtiRamchandani requested review from hamishwillee and removed request for a team June 1, 2026 09:19
@github-actions github-actions Bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Jun 1, 2026
@hamishwillee

Copy link
Copy Markdown
Collaborator

@KirtiRamchandani As discussed, it's best not to fix issues that still have the "needs-triage" label - they might not be correct, and even if they are true, the proposed solution might not be optimal.

I've suggested a solution in in #44273 (comment)
I still think your note is also useful in addition, but it probably should mention both the deprecated method and the new alternative, so people can make an informed decision.

@KirtiRamchandani

Copy link
Copy Markdown
Contributor Author

Thanks, updated in fe3ec4495e to follow the suggested direction:

  • the examples now use transport.datagrams.createWritable() when supported.
  • they fall back to transport.datagrams.writable with an inline deprecated/non-standard comment.
  • the note now mentions both the newer method and the deprecated property so readers know to check compatibility before choosing a write API.

Local checks:

  • corepack npm exec --yes --package prettier@3.8.3 -- prettier --check files/en-us/web/api/webtransport/datagrams/index.md files/en-us/web/api/webtransportdatagramduplexstream/index.md
  • corepack npm exec --yes --package markdownlint-cli2@0.22.1 --package markdownlint-rule-search-replace@1.2.0 -- markdownlint-cli2 files/en-us/web/api/webtransport/datagrams/index.md files/en-us/web/api/webtransportdatagramduplexstream/index.md
  • git diff --check

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebTransport docs still uses examples with deprecated/non-standard writable property

3 participants