| 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 28 matching lines...) Expand all Loading... |
| 39 "stream" | 39 "stream" |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 [ | 42 [ |
| 43 WillBeGarbageCollected, | 43 WillBeGarbageCollected, |
| 44 ActiveDOMObject, | 44 ActiveDOMObject, |
| 45 Constructor, | 45 Constructor, |
| 46 ConstructorCallWith=ScriptState, | 46 ConstructorCallWith=ScriptState, |
| 47 Exposed=(Window,DedicatedWorker,SharedWorker) | 47 Exposed=(Window,DedicatedWorker,SharedWorker) |
| 48 ] interface XMLHttpRequest : XMLHttpRequestEventTarget { | 48 ] interface XMLHttpRequest : XMLHttpRequestEventTarget { |
| 49 // event handler attributes | 49 // event handler |
| 50 attribute EventHandler onreadystatechange; | 50 attribute EventHandler onreadystatechange; |
| 51 | 51 |
| 52 // state | 52 // states |
| 53 const unsigned short UNSENT = 0; | 53 const unsigned short UNSENT = 0; |
| 54 const unsigned short OPENED = 1; | 54 const unsigned short OPENED = 1; |
| 55 const unsigned short HEADERS_RECEIVED = 2; | 55 const unsigned short HEADERS_RECEIVED = 2; |
| 56 const unsigned short LOADING = 3; | 56 const unsigned short LOADING = 3; |
| 57 const unsigned short DONE = 4; | 57 const unsigned short DONE = 4; |
| 58 | |
| 59 [RaisesException=Setter] attribute unsigned long timeout; | |
| 60 readonly attribute unsigned short readyState; | 58 readonly attribute unsigned short readyState; |
| 61 | 59 |
| 60 // request |
| 61 [RaisesException] void open(DOMString method, DOMString url, optional boolea
n async, [TreatUndefinedAs=NullString] optional DOMString? user, [TreatUndefined
As=NullString] optional DOMString? password); |
| 62 [RaisesException] void setRequestHeader(DOMString header, DOMString value); |
| 63 [RaisesException=Setter] attribute unsigned long timeout; |
| 62 [RaisesException=Setter] attribute boolean withCredentials; | 64 [RaisesException=Setter] attribute boolean withCredentials; |
| 63 | 65 readonly attribute XMLHttpRequestUpload upload; |
| 64 [RaisesException] void open(DOMString method, DOMString url, optional boolea
n async, [TreatUndefinedAs=NullString] optional DOMString? user, [TreatUndefined
As=NullString] optional DOMString? password); | |
| 65 | |
| 66 [RaisesException] void setRequestHeader(DOMString header, DOMString value); | |
| 67 | |
| 68 [RaisesException] void send(optional (ArrayBuffer or ArrayBufferView or Blob
or Document or DOMString or FormData)? data); | 66 [RaisesException] void send(optional (ArrayBuffer or ArrayBufferView or Blob
or Document or DOMString or FormData)? data); |
| 69 | |
| 70 void abort(); | 67 void abort(); |
| 71 | 68 |
| 72 readonly attribute XMLHttpRequestUpload upload; | |
| 73 | |
| 74 // response | 69 // response |
| 70 readonly attribute DOMString responseURL; |
| 71 readonly attribute unsigned short status; |
| 72 readonly attribute DOMString statusText; |
| 73 DOMString? getResponseHeader(DOMString header); |
| 75 [TreatReturnedNullStringAs=Undefined] DOMString getAllResponseHeaders(); | 74 [TreatReturnedNullStringAs=Undefined] DOMString getAllResponseHeaders(); |
| 76 DOMString? getResponseHeader(DOMString header); | 75 [RaisesException] void overrideMimeType(DOMString override); |
| 76 [RaisesException=Setter] attribute XMLHttpRequestResponseType responseType; |
| 77 [Custom=Getter, RaisesException=Getter] readonly attribute object response; |
| 77 [Custom=Getter, RaisesException=Getter] readonly attribute DOMString? respon
seText; | 78 [Custom=Getter, RaisesException=Getter] readonly attribute DOMString? respon
seText; |
| 78 [RaisesException=Getter] readonly attribute Document responseXML; | 79 [RaisesException=Getter] readonly attribute Document responseXML; |
| 79 | |
| 80 [RaisesException=Setter] attribute XMLHttpRequestResponseType responseType; | |
| 81 [Custom=Getter, RaisesException=Getter] readonly attribute object response; | |
| 82 readonly attribute DOMString responseURL; | |
| 83 | |
| 84 readonly attribute unsigned short status; | |
| 85 readonly attribute DOMString statusText; | |
| 86 | |
| 87 // Extension | |
| 88 [RaisesException] void overrideMimeType(DOMString override); | |
| 89 }; | 80 }; |
| OLD | NEW |