summaryrefslogtreecommitdiff
path: root/dom/webidl
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2023-09-28 14:05:55 -0500
committerBrian Smith <brian@dbsoft.org>2023-09-28 14:05:55 -0500
commit8a0c7bde6353d1043c148fbb14accf47ab5fc0b2 (patch)
tree6c1f6499c819b71061ab90b542f03e164b221237 /dom/webidl
parent1a429629d228354d25d8cfee7efb93d9c8ac02c4 (diff)
downloaduxp-8a0c7bde6353d1043c148fbb14accf47ab5fc0b2.tar.gz
Issue #1442 - Part 11 - Response.body handling.
https://bugzilla.mozilla.org/show_bug.cgi?id=1329298 Use BufferSource in webIDL. https://bugzilla.mozilla.org/show_bug.cgi?id=1337722
Diffstat (limited to 'dom/webidl')
-rw-r--r--dom/webidl/Fetch.webidl2
-rw-r--r--dom/webidl/Response.webidl4
2 files changed, 4 insertions, 2 deletions
diff --git a/dom/webidl/Fetch.webidl b/dom/webidl/Fetch.webidl
index 4b2a0af7d0..137cbde354 100644
--- a/dom/webidl/Fetch.webidl
+++ b/dom/webidl/Fetch.webidl
@@ -8,7 +8,7 @@
*/
typedef object JSON;
-typedef (ArrayBuffer or ArrayBufferView or Blob or FormData or USVString or URLSearchParams) BodyInit;
+typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) BodyInit;
[NoInterfaceObject, Exposed=(Window,Worker)]
interface Body {
diff --git a/dom/webidl/Response.webidl b/dom/webidl/Response.webidl
index d02b714f7d..0f4c99dbac 100644
--- a/dom/webidl/Response.webidl
+++ b/dom/webidl/Response.webidl
@@ -7,7 +7,9 @@
* https://fetch.spec.whatwg.org/#response-class
*/
-[Constructor(optional BodyInit? body, optional ResponseInit init),
+// This should be Constructor(optional BodyInit... but BodyInit doesn't include
+// ReadableStream yet because we don't want to expose the Streams API to Request.
+[Constructor(optional (Blob or BufferSource or FormData or URLSearchParams or ReadableStream or USVString) body, optional ResponseInit init),
Exposed=(Window,Worker)]
interface Response {
[NewObject] static Response error();