summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/interfaces/xhr.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/interfaces/xhr.idl
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/interfaces/xhr.idl')
-rw-r--r--testing/web-platform/tests/interfaces/xhr.idl99
1 files changed, 99 insertions, 0 deletions
diff --git a/testing/web-platform/tests/interfaces/xhr.idl b/testing/web-platform/tests/interfaces/xhr.idl
new file mode 100644
index 0000000000..b4c27c8aca
--- /dev/null
+++ b/testing/web-platform/tests/interfaces/xhr.idl
@@ -0,0 +1,99 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: XMLHttpRequest Standard (https://xhr.spec.whatwg.org/)
+
+[Exposed=(Window,DedicatedWorker,SharedWorker)]
+interface XMLHttpRequestEventTarget : EventTarget {
+ // event handlers
+ attribute EventHandler onloadstart;
+ attribute EventHandler onprogress;
+ attribute EventHandler onabort;
+ attribute EventHandler onerror;
+ attribute EventHandler onload;
+ attribute EventHandler ontimeout;
+ attribute EventHandler onloadend;
+};
+
+[Exposed=(Window,DedicatedWorker,SharedWorker)]
+interface XMLHttpRequestUpload : XMLHttpRequestEventTarget {
+};
+
+enum XMLHttpRequestResponseType {
+ "",
+ "arraybuffer",
+ "blob",
+ "document",
+ "json",
+ "text"
+};
+
+[Exposed=(Window,DedicatedWorker,SharedWorker)]
+interface XMLHttpRequest : XMLHttpRequestEventTarget {
+ constructor();
+
+ // event handler
+ attribute EventHandler onreadystatechange;
+
+ // states
+ 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;
+
+ // request
+ undefined open(ByteString method, USVString url);
+ undefined open(ByteString method, USVString url, boolean async, optional USVString? username = null, optional USVString? password = null);
+ undefined setRequestHeader(ByteString name, ByteString value);
+ attribute unsigned long timeout;
+ attribute boolean withCredentials;
+ [SameObject] readonly attribute XMLHttpRequestUpload upload;
+ undefined send(optional (Document or XMLHttpRequestBodyInit)? body = null);
+ undefined abort();
+
+ // response
+ readonly attribute USVString responseURL;
+ readonly attribute unsigned short status;
+ readonly attribute ByteString statusText;
+ ByteString? getResponseHeader(ByteString name);
+ ByteString getAllResponseHeaders();
+ undefined overrideMimeType(DOMString mime);
+ attribute XMLHttpRequestResponseType responseType;
+ readonly attribute any response;
+ readonly attribute USVString responseText;
+ [Exposed=Window] readonly attribute Document? responseXML;
+};
+
+typedef (File or USVString) FormDataEntryValue;
+
+[Exposed=(Window,Worker)]
+interface FormData {
+ constructor(optional HTMLFormElement form, optional HTMLElement? submitter = null);
+
+ undefined append(USVString name, USVString value);
+ undefined append(USVString name, Blob blobValue, optional USVString filename);
+ undefined delete(USVString name);
+ FormDataEntryValue? get(USVString name);
+ sequence<FormDataEntryValue> getAll(USVString name);
+ boolean has(USVString name);
+ undefined set(USVString name, USVString value);
+ undefined set(USVString name, Blob blobValue, optional USVString filename);
+ iterable<USVString, FormDataEntryValue>;
+};
+
+[Exposed=(Window,Worker)]
+interface ProgressEvent : Event {
+ constructor(DOMString type, optional ProgressEventInit eventInitDict = {});
+
+ readonly attribute boolean lengthComputable;
+ readonly attribute unsigned long long loaded;
+ readonly attribute unsigned long long total;
+};
+
+dictionary ProgressEventInit : EventInit {
+ boolean lengthComputable = false;
+ unsigned long long loaded = 0;
+ unsigned long long total = 0;
+};