/* * Copyright © 2009 W3C® (MIT, ERCIM, Keio), All Rights Reserved. * W3C liability, trademark and document use rules apply. * * W3C The XMLHttpRequest Object * W3C Working Draft 15 April 2008 * http://www.w3.org/TR/XMLHttpRequest/ */ #ifndef _XHR_IDL_ #define _XHR_IDL_ #include "w3c/html5.idl" module html5 { typedef events::EventListener EventListener; interface XMLHttpRequest { // event handler attribute EventListener onreadystatechange; // state 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 void open(in DOMString method, in DOMString url); void open(in DOMString method, in DOMString url, in boolean async); void open(in DOMString method, in DOMString url, in boolean async, in DOMString user); void open(in DOMString method, in DOMString url, in boolean async, in DOMString user, in DOMString password); void setRequestHeader(in DOMString header, in DOMString value); void send(); void send(in DOMString data); void send(in Document data); void abort(); // response DOMString getAllResponseHeaders(); DOMString getResponseHeader(in DOMString header); readonly attribute DOMString responseText; readonly attribute Document responseXML; readonly attribute unsigned short status; readonly attribute DOMString statusText; }; }; // module html5 #endif // _XHR_IDL_