Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Unified Diff: core/xmlhttprequest/XMLHttpRequest.idl

Issue 1660113002: Updated to Chrome 45 (2454) moved from SVN to git. Base URL: https://github.com/dart-lang/webcore.git@roll_45
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/xml/XSLTProcessor.idl ('k') | core/xmlhttprequest/XMLHttpRequestEventTarget.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/xmlhttprequest/XMLHttpRequest.idl
diff --git a/core/xml/XMLHttpRequest.idl b/core/xmlhttprequest/XMLHttpRequest.idl
similarity index 67%
rename from core/xml/XMLHttpRequest.idl
rename to core/xmlhttprequest/XMLHttpRequest.idl
index 4facb562003920c931cde7aabec527290f754f31..da146641808b683f4ec87a0a21dfa82661a7cfe6 100644
--- a/core/xml/XMLHttpRequest.idl
+++ b/core/xmlhttprequest/XMLHttpRequest.idl
@@ -26,6 +26,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+// https://xhr.spec.whatwg.org/#interface-xmlhttprequest
+
enum XMLHttpRequestResponseType {
"",
"arraybuffer",
@@ -34,60 +36,51 @@ enum XMLHttpRequestResponseType {
"json",
"text",
"legacystream",
- "stream"
};
+// TODO(philipj): Most DOMString types in the XMLHttpRequest interface should be
+// either ByteString or USVString.
[
- WillBeGarbageCollected,
ActiveDOMObject,
- CustomConstructor(optional XMLHttpRequestOptions options),
+ Constructor,
+ ConstructorCallWith=ScriptState,
+ // TODO(philipj): The spec has Exposed=(Window,Worker)
+ // https://github.com/whatwg/xhr/issues/19
Exposed=(Window,DedicatedWorker,SharedWorker)
] interface XMLHttpRequest : XMLHttpRequestEventTarget {
- // event handler attributes
+ // event handler
attribute EventHandler onreadystatechange;
- // state
+ // 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;
-
- [RaisesException=Setter] attribute unsigned long timeout;
readonly attribute unsigned short readyState;
+ // request
+ [RaisesException] void open(DOMString method, DOMString url);
+ [RaisesException] void open(DOMString method, DOMString url, boolean async, optional DOMString? username = null, optional DOMString? password = null);
+ [RaisesException] void setRequestHeader(DOMString name, DOMString value);
+ [RaisesException=Setter] attribute unsigned long timeout;
[RaisesException=Setter] 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();
- // FIXMEDART: send(ArrayBuffer data) should be eventually deprecated.
- [DartCustom=New] void send(ArrayBuffer data);
- [DartCustom=New] void send(ArrayBufferView data);
- [DartCustom=New] void send(Blob data);
- [DartCustom=New] void send(Document data);
- [DartCustom=New] void send(DOMString data);
- [DartCustom=New] void send(FormData data);
-
- void abort();
-
readonly attribute XMLHttpRequestUpload upload;
+ // TODO(philipj): The data argument should be of type
+ // (Document or BodyInit)?
+ [RaisesException] void send(optional (ArrayBuffer or ArrayBufferView or Blob or Document or DOMString or FormData)? body = null);
+ void abort();
// response
- [TreatReturnedNullStringAs=Undefined] DOMString getAllResponseHeaders();
- DOMString? getResponseHeader(DOMString header);
- [Custom=Getter, RaisesException=Getter] readonly attribute DOMString? responseText;
- [RaisesException=Getter] readonly attribute Document responseXML;
-
- [RaisesException=Setter] attribute XMLHttpRequestResponseType responseType;
- [Custom=Getter, RaisesException=Getter] readonly attribute object response;
readonly attribute DOMString responseURL;
-
readonly attribute unsigned short status;
readonly attribute DOMString statusText;
-
- // Extension
- [RaisesException] void overrideMimeType(DOMString override);
+ DOMString? getResponseHeader(DOMString name);
+ DOMString getAllResponseHeaders();
+ [RaisesException] void overrideMimeType(DOMString mime);
+ [RaisesException=Setter] attribute XMLHttpRequestResponseType responseType;
+ [Custom=Getter, RaisesException=Getter] readonly attribute any response;
+ [Custom=Getter, RaisesException=Getter] readonly attribute DOMString responseText;
+ // TODO(philipj): responseXML should be [Exposed=Window].
+ [RaisesException=Getter] readonly attribute Document? responseXML;
};
« no previous file with comments | « core/xml/XSLTProcessor.idl ('k') | core/xmlhttprequest/XMLHttpRequestEventTarget.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698