LibWeb: Add BodyInit union type

This commit is contained in:
Linus Groh 2022-09-22 00:10:41 +01:00
commit 8f5620b5d9
Notes: sideshowbarker 2024-07-17 06:42:26 +09:00
2 changed files with 9 additions and 0 deletions

View file

@ -16,6 +16,9 @@ namespace Web::Fetch {
// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit
using XMLHttpRequestBodyInit = Variant<JS::Handle<FileAPI::Blob>, JS::Handle<JS::Object>, JS::Handle<URL::URLSearchParams>, String>;
// https://fetch.spec.whatwg.org/#bodyinit
using BodyInit = Variant<JS::Handle<Streams::ReadableStream>, JS::Handle<FileAPI::Blob>, JS::Handle<JS::Object>, JS::Handle<URL::URLSearchParams>, String>;
ErrorOr<Infrastructure::BodyWithType> extract_body(JS::Realm&, XMLHttpRequestBodyInit const&);
}