diff --git a/Userland/Libraries/LibWeb/Fetch/BodyInit.h b/Userland/Libraries/LibWeb/Fetch/BodyInit.h index 24dc2f244c..cd2be22857 100644 --- a/Userland/Libraries/LibWeb/Fetch/BodyInit.h +++ b/Userland/Libraries/LibWeb/Fetch/BodyInit.h @@ -16,6 +16,9 @@ namespace Web::Fetch { // https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit using XMLHttpRequestBodyInit = Variant, JS::Handle, JS::Handle, String>; +// https://fetch.spec.whatwg.org/#bodyinit +using BodyInit = Variant, JS::Handle, JS::Handle, JS::Handle, String>; + ErrorOr extract_body(JS::Realm&, XMLHttpRequestBodyInit const&); } diff --git a/Userland/Libraries/LibWeb/Fetch/BodyInit.idl b/Userland/Libraries/LibWeb/Fetch/BodyInit.idl index 15f001a8a8..d57d42bffb 100644 --- a/Userland/Libraries/LibWeb/Fetch/BodyInit.idl +++ b/Userland/Libraries/LibWeb/Fetch/BodyInit.idl @@ -1,5 +1,11 @@ #import +#import #import // https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit typedef (Blob or BufferSource or URLSearchParams or USVString) XMLHttpRequestBodyInit; + +// https://fetch.spec.whatwg.org/#bodyinit +// FIXME: IDLParser doesn't resolve nested unions properly +// typedef (ReadableStream or XMLHttpRequestBodyInit) BodyInit; +typedef (ReadableStream or Blob or BufferSource or URLSearchParams or USVString) BodyInit;