| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 ] interface XMLHttpRequest : XMLHttpRequestEventTarget { | 48 ] interface XMLHttpRequest : XMLHttpRequestEventTarget { |
| 49 // event handler | 49 // event handler |
| 50 attribute EventHandler onreadystatechange; | 50 attribute EventHandler onreadystatechange; |
| 51 | 51 |
| 52 // states | 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 readonly attribute unsigned short readyState; | 58 [ImplementedAs=getReadyState] readonly attribute unsigned short readyState; |
| 59 | 59 |
| 60 // request | 60 // request |
| 61 [RaisesException] void open(DOMString method, DOMString url); | 61 [RaisesException] void open(DOMString method, DOMString url); |
| 62 [RaisesException] void open(DOMString method, DOMString url, boolean async,
optional DOMString? username = null, optional DOMString? password = null); | 62 [RaisesException] void open(DOMString method, DOMString url, boolean async,
optional DOMString? username = null, optional DOMString? password = null); |
| 63 [RaisesException] void setRequestHeader(DOMString name, DOMString value); | 63 [RaisesException] void setRequestHeader(DOMString name, DOMString value); |
| 64 [RaisesException=Setter] attribute unsigned long timeout; | 64 [RaisesException=Setter] attribute unsigned long timeout; |
| 65 [RaisesException=Setter] attribute boolean withCredentials; | 65 [RaisesException=Setter] attribute boolean withCredentials; |
| 66 readonly attribute XMLHttpRequestUpload upload; | 66 readonly attribute XMLHttpRequestUpload upload; |
| 67 // TODO(foolip): The data argument should be of type | 67 // TODO(foolip): The data argument should be of type |
| 68 // (Document or BodyInit)? | 68 // (Document or BodyInit)? |
| 69 [RaisesException] void send(optional (ArrayBuffer or ArrayBufferView or Blob
or Document or DOMString or FormData)? body = null); | 69 [RaisesException] void send(optional (ArrayBuffer or ArrayBufferView or Blob
or Document or DOMString or FormData)? body = null); |
| 70 void abort(); | 70 void abort(); |
| 71 | 71 |
| 72 // response | 72 // response |
| 73 readonly attribute DOMString responseURL; | 73 readonly attribute DOMString responseURL; |
| 74 readonly attribute unsigned short status; | 74 readonly attribute unsigned short status; |
| 75 readonly attribute DOMString statusText; | 75 readonly attribute DOMString statusText; |
| 76 DOMString? getResponseHeader(DOMString name); | 76 DOMString? getResponseHeader(DOMString name); |
| 77 DOMString getAllResponseHeaders(); | 77 DOMString getAllResponseHeaders(); |
| 78 [RaisesException] void overrideMimeType(DOMString mime); | 78 [RaisesException] void overrideMimeType(DOMString mime); |
| 79 [RaisesException=Setter] attribute XMLHttpRequestResponseType responseType; | 79 [RaisesException=Setter] attribute XMLHttpRequestResponseType responseType; |
| 80 [Custom=Getter, RaisesException=Getter] readonly attribute any response; | 80 [Custom=Getter, RaisesException=Getter] readonly attribute any response; |
| 81 [Custom=Getter, RaisesException=Getter] readonly attribute DOMString respons
eText; | 81 [Custom=Getter, RaisesException=Getter] readonly attribute DOMString respons
eText; |
| 82 // TODO(foolip): responseXML should be [Exposed=Window]. | 82 // TODO(foolip): responseXML should be [Exposed=Window]. |
| 83 [RaisesException=Getter] readonly attribute Document? responseXML; | 83 [RaisesException=Getter] readonly attribute Document? responseXML; |
| 84 }; | 84 }; |
| OLD | NEW |