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

Side by Side 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, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 21 matching lines...) Expand all
32 "", 32 "",
33 "arraybuffer", 33 "arraybuffer",
34 "blob", 34 "blob",
35 "document", 35 "document",
36 "json", 36 "json",
37 "text", 37 "text",
38 "legacystream", 38 "legacystream",
39 "stream" 39 "stream"
40 }; 40 };
41 41
42 // TODO(philipj): Most DOMString types in the XMLHttpRequest interface should be
43 // either ByteString or USVString.
42 [ 44 [
43 WillBeGarbageCollected, 45 WillBeGarbageCollected,
44 ActiveDOMObject, 46 ActiveDOMObject,
45 Constructor, 47 Constructor,
46 ConstructorCallWith=ScriptState, 48 ConstructorCallWith=ScriptState,
49 // TODO(philipj): The spec has Exposed=(Window,Worker)
50 // https://github.com/whatwg/xhr/issues/19
47 Exposed=(Window,DedicatedWorker,SharedWorker) 51 Exposed=(Window,DedicatedWorker,SharedWorker)
48 ] interface XMLHttpRequest : XMLHttpRequestEventTarget { 52 ] interface XMLHttpRequest : XMLHttpRequestEventTarget {
49 // event handler 53 // event handler
50 attribute EventHandler onreadystatechange; 54 attribute EventHandler onreadystatechange;
51 55
52 // states 56 // states
53 const unsigned short UNSENT = 0; 57 const unsigned short UNSENT = 0;
54 const unsigned short OPENED = 1; 58 const unsigned short OPENED = 1;
55 const unsigned short HEADERS_RECEIVED = 2; 59 const unsigned short HEADERS_RECEIVED = 2;
56 const unsigned short LOADING = 3; 60 const unsigned short LOADING = 3;
57 const unsigned short DONE = 4; 61 const unsigned short DONE = 4;
58 readonly attribute unsigned short readyState; 62 readonly attribute unsigned short readyState;
59 63
60 // request 64 // request
61 [RaisesException] void open(DOMString method, DOMString url, optional boolea n async, [TreatUndefinedAs=NullString] optional DOMString? user, [TreatUndefined As=NullString] optional DOMString? password); 65 [RaisesException] void open(DOMString method, DOMString url);
62 [RaisesException] void setRequestHeader(DOMString header, DOMString value); 66 [RaisesException] void open(DOMString method, DOMString url, boolean async, optional DOMString? username = null, optional DOMString? password = null);
67 [RaisesException] void setRequestHeader(DOMString name, DOMString value);
63 [RaisesException=Setter] attribute unsigned long timeout; 68 [RaisesException=Setter] attribute unsigned long timeout;
64 [RaisesException=Setter] attribute boolean withCredentials; 69 [RaisesException=Setter] attribute boolean withCredentials;
65 readonly attribute XMLHttpRequestUpload upload; 70 readonly attribute XMLHttpRequestUpload upload;
66 [RaisesException] void send(optional (ArrayBuffer or ArrayBufferView or Blob or Document or DOMString or FormData)? data); 71 // TODO(philipj): The data argument should be of type
72 // (Document or BodyInit)?
73 [RaisesException] void send(optional (ArrayBuffer or ArrayBufferView or Blob or Document or DOMString or FormData)? body = null);
67 void abort(); 74 void abort();
68 75
69 // response 76 // response
70 readonly attribute DOMString responseURL; 77 readonly attribute DOMString responseURL;
71 readonly attribute unsigned short status; 78 readonly attribute unsigned short status;
72 readonly attribute DOMString statusText; 79 readonly attribute DOMString statusText;
73 DOMString? getResponseHeader(DOMString header); 80 DOMString? getResponseHeader(DOMString name);
74 [TreatReturnedNullStringAs=Undefined] DOMString getAllResponseHeaders(); 81 DOMString getAllResponseHeaders();
75 [RaisesException] void overrideMimeType(DOMString override); 82 [RaisesException] void overrideMimeType(DOMString mime);
76 [RaisesException=Setter] attribute XMLHttpRequestResponseType responseType; 83 [RaisesException=Setter] attribute XMLHttpRequestResponseType responseType;
77 [Custom=Getter, RaisesException=Getter] readonly attribute object response; 84 [Custom=Getter, RaisesException=Getter] readonly attribute any response;
78 [Custom=Getter, RaisesException=Getter] readonly attribute DOMString? respon seText; 85 [Custom=Getter, RaisesException=Getter] readonly attribute DOMString respons eText;
79 [RaisesException=Getter] readonly attribute Document responseXML; 86 // TODO(philipj): responseXML should be [Exposed=Window].
87 [RaisesException=Getter] readonly attribute Document? responseXML;
80 }; 88 };
OLDNEW
« 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