mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 20:34:59 +00:00

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.
40 lines
1.2 KiB
Text
40 lines
1.2 KiB
Text
#import <XHR/XMLHttpRequestEventTarget.idl>
|
|
#import <DOM/EventHandler.idl>
|
|
|
|
enum XMLHttpRequestResponseType {
|
|
"",
|
|
"arraybuffer",
|
|
"blob",
|
|
"document",
|
|
"json",
|
|
"text"
|
|
};
|
|
|
|
interface XMLHttpRequest : XMLHttpRequestEventTarget {
|
|
|
|
constructor();
|
|
|
|
const unsigned short UNSENT = 0;
|
|
const unsigned short OPENED = 1;
|
|
const unsigned short HEADERS_RECEIVED = 2;
|
|
const unsigned short LOADING = 3;
|
|
const unsigned short DONE = 4;
|
|
|
|
readonly attribute unsigned short readyState;
|
|
readonly attribute unsigned short status;
|
|
readonly attribute DOMString responseText;
|
|
readonly attribute any response;
|
|
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 = {});
|
|
|
|
ByteString? getResponseHeader(ByteString name);
|
|
ByteString getAllResponseHeaders();
|
|
undefined overrideMimeType(DOMString mime);
|
|
|
|
attribute EventHandler onreadystatechange;
|
|
|
|
};
|