From b7ad11fe9dda7f2e36e7cbef2f8c31752d85908a Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Fri, 10 May 2024 09:26:57 -0700 Subject: [PATCH] Add bytes() method for reading bytes into a Uint8Array --- index.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.html b/index.html index 8b6511e..e3316ac 100644 --- a/index.html +++ b/index.html @@ -976,6 +976,7 @@

interface PushMessageData { ArrayBuffer arrayBuffer(); Blob blob(); + Uint8Array bytes(); any json(); USVString text(); }; @@ -993,6 +994,11 @@

The blob() method, when invoked, MUST return a {{Blob}} whose contents are |bytes| and |type| is not provided.

+

+ The bytes() 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. +

The json() method, when invoked, MUST return the result of invoking the initial value of `JSON`.{{JSON/parse()}} with the result of running utf-8 decode on |bytes|