Skip to content

Commit

Permalink
Add bytes() method for reading bytes into a Uint8Array
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot committed May 10, 2024
1 parent 28f2a51 commit b7ad11f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ <h2>
interface PushMessageData {
ArrayBuffer arrayBuffer();
Blob blob();
Uint8Array bytes();
any json();
USVString text();
};
Expand All @@ -993,6 +994,11 @@ <h2>
The <dfn>blob()</dfn> method, when invoked, MUST return a {{Blob}} whose contents are
|bytes| and |type| is not provided.
</p>
<p>
The <dfn>bytes()</dfn> method, when invoked, MUST return a {{Uint8Array}} backed by a
{{ArrayBuffer}} whose contents are |bytes|. Exceptions thrown during the creation of the
{{ArrayBuffer}} object are re-thrown.
</p>
<p data-cite="encoding">
The <dfn>json()</dfn> method, when invoked, MUST return the result of invoking the initial
value of `JSON`.{{JSON/parse()}} with the result of running <a>utf-8 decode</a> on |bytes|
Expand Down

0 comments on commit b7ad11f

Please sign in to comment.