XMLHttpRequest.idl [plain text]
enum XMLHttpRequestResponseType {
"",
"arraybuffer",
"blob",
"document",
"json",
"text"
};
[
GlobalContext=DOMWindow&WorkerGlobalScope,
ActiveDOMObject,
Constructor,
ConstructorCallWith=ScriptExecutionContext,
JSCustomMarkFunction,
EventTarget,
] interface XMLHttpRequest {
attribute EventHandler onabort;
attribute EventHandler onerror;
attribute EventHandler onload;
attribute EventHandler onloadend;
attribute EventHandler onloadstart;
attribute EventHandler onprogress;
[Conditional=XHR_TIMEOUT] attribute EventHandler ontimeout;
attribute EventHandler onreadystatechange;
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;
[Conditional=XHR_TIMEOUT, SetterRaisesException] attribute unsigned long timeout;
readonly attribute unsigned short readyState;
[SetterRaisesException] attribute boolean withCredentials;
[Custom, RaisesException] void open(DOMString method, DOMString url, optional boolean async, optional DOMString user, optional DOMString password);
[RaisesException] void setRequestHeader(DOMString header, DOMString value);
[Custom, RaisesException] void send();
void abort();
readonly attribute XMLHttpRequestUpload upload;
[TreatReturnedNullStringAs=Undefined] DOMString getAllResponseHeaders();
[TreatReturnedNullStringAs=Null] DOMString getResponseHeader(DOMString header);
[GetterRaisesException, CustomGetter] readonly attribute DOMString responseText; [GetterRaisesException] readonly attribute Document responseXML;
[SetterRaisesException] attribute XMLHttpRequestResponseType responseType;
[GetterRaisesException, CachedAttribute, CustomGetter] readonly attribute Object response;
readonly attribute unsigned short status;
readonly attribute DOMString statusText;
readonly attribute DOMString responseURL;
[RaisesException] void overrideMimeType(DOMString override);
void addEventListener(DOMString type, EventListener listener, optional boolean useCapture);
void removeEventListener(DOMString type, EventListener listener, optional boolean useCapture);
[RaisesException] boolean dispatchEvent(Event event);
};