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

Unified Diff: Source/core/xmlhttprequest/XMLHttpRequest.idl

Issue 1167563002: Sync the XHR-related interfaces with the spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: data->body Created 5 years, 7 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
Index: Source/core/xmlhttprequest/XMLHttpRequest.idl
diff --git a/Source/core/xmlhttprequest/XMLHttpRequest.idl b/Source/core/xmlhttprequest/XMLHttpRequest.idl
index 8aadc72283c72ec7446febf4cd5f236ae68734c6..4f873ea5400145d0c4ca8497fa2b46314cf25a9d 100644
--- a/Source/core/xmlhttprequest/XMLHttpRequest.idl
+++ b/Source/core/xmlhttprequest/XMLHttpRequest.idl
@@ -39,11 +39,15 @@ enum XMLHttpRequestResponseType {
"stream"
};
+// TODO(philipj): Most DOMString types in the XMLHttpRequest interface should be
+// either ByteString or USVString.
[
WillBeGarbageCollected,
ActiveDOMObject,
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
@@ -58,23 +62,27 @@ enum XMLHttpRequestResponseType {
readonly attribute unsigned short readyState;
// request
- [RaisesException] void open(DOMString method, DOMString url, optional boolean async, [TreatUndefinedAs=NullString] optional DOMString? user, [TreatUndefinedAs=NullString] optional DOMString? password);
- [RaisesException] void setRequestHeader(DOMString header, DOMString value);
+ [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;
readonly attribute XMLHttpRequestUpload upload;
- [RaisesException] void send(optional (ArrayBuffer or ArrayBufferView or Blob or Document or DOMString or FormData)? data);
+ // 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
readonly attribute DOMString responseURL;
readonly attribute unsigned short status;
readonly attribute DOMString statusText;
- DOMString? getResponseHeader(DOMString header);
- [TreatReturnedNullStringAs=Undefined] DOMString getAllResponseHeaders();
- [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 object response;
- [Custom=Getter, RaisesException=Getter] readonly attribute DOMString? responseText;
- [RaisesException=Getter] readonly attribute Document responseXML;
+ [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 | « Source/core/xmlhttprequest/XMLHttpRequest.cpp ('k') | Source/core/xmlhttprequest/XMLHttpRequestEventTarget.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698