1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 20:57:44 +00:00

LibWeb: Add XMLHttpRequest::open() overload

This adds the XMLHttpRequest::open(String, String, bool, String, String)
overload.

The following FIXMEs has been implemented:
- If method is not a method, then throw a "SyntaxError" DOMException.
- If the username argument is not null, set the username given parsedURL
  and username.
- If the password argument is not null, set the password given parsedURL
  and password.
- Set this’s synchronous flag if async is false; otherwise unset this’s
  synchronous flag.

Spec comments has also been updated.
This commit is contained in:
Kenneth Myhra 2022-04-03 18:43:02 +02:00 committed by Andreas Kling
parent 0b86574293
commit 69f05a66fc
3 changed files with 51 additions and 15 deletions

View file

@ -27,6 +27,7 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {
attribute XMLHttpRequestResponseType responseType;
undefined open(DOMString method, DOMString url);
undefined open(ByteString method, USVString url, boolean async, optional USVString? username = {}, optional USVString? password = {});
undefined setRequestHeader(DOMString name, DOMString value);
undefined send(optional USVString body = {});