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
commit 69f05a66fc
Notes: sideshowbarker 2024-07-17 14:24:08 +09:00
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 = {});