Skip to content

Commit a2f3730

Browse files
Add bytes() method for reading bytes into a Uint8Array (#370)
1 parent 28f2a51 commit a2f3730

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,7 @@ <h2>
976976
interface PushMessageData {
977977
ArrayBuffer arrayBuffer();
978978
Blob blob();
979+
Uint8Array bytes();
979980
any json();
980981
USVString text();
981982
};
@@ -993,6 +994,11 @@ <h2>
993994
The <dfn>blob()</dfn> method, when invoked, MUST return a {{Blob}} whose contents are
994995
|bytes| and |type| is not provided.
995996
</p>
997+
<p>
998+
The <dfn>bytes()</dfn> method, when invoked, MUST return a {{Uint8Array}} backed by a
999+
{{ArrayBuffer}} whose contents are |bytes|. Exceptions thrown during the creation of the
1000+
{{ArrayBuffer}} object are re-thrown.
1001+
</p>
9961002
<p data-cite="encoding">
9971003
The <dfn>json()</dfn> method, when invoked, MUST return the result of invoking the initial
9981004
value of `JSON`.{{JSON/parse()}} with the result of running <a>utf-8 decode</a> on |bytes|

0 commit comments

Comments
 (0)