| OLD | NEW |
| 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 23 matching lines...) Expand all Loading... |
| 34 "blob", | 34 "blob", |
| 35 "document", | 35 "document", |
| 36 "json", | 36 "json", |
| 37 "text", | 37 "text", |
| 38 "legacystream", | 38 "legacystream", |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 // TODO(philipj): Most DOMString types in the XMLHttpRequest interface should be | 41 // TODO(philipj): Most DOMString types in the XMLHttpRequest interface should be |
| 42 // either ByteString or USVString. | 42 // either ByteString or USVString. |
| 43 [ | 43 [ |
| 44 ActiveDOMObject, | 44 DependentLifetime, |
| 45 Constructor, | 45 Constructor, |
| 46 ConstructorCallWith=ScriptState, | 46 ConstructorCallWith=ScriptState, |
| 47 // TODO(philipj): The spec has Exposed=(Window,Worker) | |
| 48 // https://github.com/whatwg/xhr/issues/19 | |
| 49 Exposed=(Window,DedicatedWorker,SharedWorker) | 47 Exposed=(Window,DedicatedWorker,SharedWorker) |
| 50 ] interface XMLHttpRequest : XMLHttpRequestEventTarget { | 48 ] interface XMLHttpRequest : XMLHttpRequestEventTarget { |
| 51 // event handler | 49 // event handler |
| 52 attribute EventHandler onreadystatechange; | 50 attribute EventHandler onreadystatechange; |
| 53 | 51 |
| 54 // states | 52 // states |
| 55 const unsigned short UNSENT = 0; | 53 const unsigned short UNSENT = 0; |
| 56 const unsigned short OPENED = 1; | 54 const unsigned short OPENED = 1; |
| 57 const unsigned short HEADERS_RECEIVED = 2; | 55 const unsigned short HEADERS_RECEIVED = 2; |
| 58 const unsigned short LOADING = 3; | 56 const unsigned short LOADING = 3; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 77 readonly attribute DOMString statusText; | 75 readonly attribute DOMString statusText; |
| 78 DOMString? getResponseHeader(DOMString name); | 76 DOMString? getResponseHeader(DOMString name); |
| 79 DOMString getAllResponseHeaders(); | 77 DOMString getAllResponseHeaders(); |
| 80 [RaisesException] void overrideMimeType(DOMString mime); | 78 [RaisesException] void overrideMimeType(DOMString mime); |
| 81 [RaisesException=Setter] attribute XMLHttpRequestResponseType responseType; | 79 [RaisesException=Setter] attribute XMLHttpRequestResponseType responseType; |
| 82 [Custom=Getter, RaisesException=Getter] readonly attribute any response; | 80 [Custom=Getter, RaisesException=Getter] readonly attribute any response; |
| 83 [Custom=Getter, RaisesException=Getter] readonly attribute DOMString respons
eText; | 81 [Custom=Getter, RaisesException=Getter] readonly attribute DOMString respons
eText; |
| 84 // TODO(philipj): responseXML should be [Exposed=Window]. | 82 // TODO(philipj): responseXML should be [Exposed=Window]. |
| 85 [RaisesException=Getter] readonly attribute Document? responseXML; | 83 [RaisesException=Getter] readonly attribute Document? responseXML; |
| 86 }; | 84 }; |
| OLD | NEW |