Skip to content

Clarify allowed binary types for serverCertificateHashes#44026

Open
mohammed-ali-osman wants to merge 2 commits intomdn:mainfrom
mohammed-ali-osman:fix/webtransport-server-cert-hash-docs
Open

Clarify allowed binary types for serverCertificateHashes#44026
mohammed-ali-osman wants to merge 2 commits intomdn:mainfrom
mohammed-ali-osman:fix/webtransport-server-cert-hash-docs

Conversation

@mohammed-ali-osman
Copy link
Copy Markdown
Contributor

Description

This update improves the documentation for WebTransport() constructor, specifically clarifying the allowed types for the serverCertificateHashes.value field.

The previous wording suggested only ArrayBuffer or TypedArray in Syntax section, which was incomplete relative to the WebIDL specification. The updated text now correctly reflects that the value can be any BufferSource, including:

  • ArrayBuffer
  • Typed arrays (for example, Uint8Array)
  • DataView

Additionally, the example has been updated to clearly show the conversion from a hexadecimal SHA-256 hash string to its byte representation, improving clarity for developers.

Changes

  • Updated serverCertificateHashes.value type description to include DataView
  • Clarified that the value corresponds to a BufferSource (ArrayBuffer | ArrayBufferView)
  • Improved explanation of hexadecimal-to-byte conversion for SHA-256 hashes
  • Updated example to explicitly show byte-level representation
  • Ensured consistency with the WebIDL definition

Fixes #44004

@mohammed-ali-osman mohammed-ali-osman requested a review from a team as a code owner May 6, 2026 16:13
@mohammed-ali-osman mohammed-ali-osman requested review from chrisdavidmills and removed request for a team May 6, 2026 16:13
@github-actions github-actions Bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels May 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Preview URLs (1 page)

(comment last updated: 2026-05-06 17:18:48)

@mohammed-ali-osman mohammed-ali-osman force-pushed the fix/webtransport-server-cert-hash-docs branch from f04702f to e177370 Compare May 6, 2026 17:16
@mohammed-ali-osman
Copy link
Copy Markdown
Contributor Author

The GitHub Action PR Reviewdog failed twice to report and display linting issues.

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 serverCertificateHashes value can't be string

2 participants