| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 // WARNING: Do not edit - generated code. | |
| 6 | |
| 7 class _XMLHttpRequestWrappingImplementation extends DOMWrapperBase implements XM
LHttpRequest { | |
| 8 _XMLHttpRequestWrappingImplementation() : super() {} | |
| 9 | |
| 10 static create__XMLHttpRequestWrappingImplementation() native { | |
| 11 return new _XMLHttpRequestWrappingImplementation(); | |
| 12 } | |
| 13 | |
| 14 bool get asBlob() { return _get_asBlob(this); } | |
| 15 static bool _get_asBlob(var _this) native; | |
| 16 | |
| 17 void set asBlob(bool value) { _set_asBlob(this, value); } | |
| 18 static void _set_asBlob(var _this, bool value) native; | |
| 19 | |
| 20 int get readyState() { return _get_readyState(this); } | |
| 21 static int _get_readyState(var _this) native; | |
| 22 | |
| 23 Object get response() { return _get_response(this); } | |
| 24 static Object _get_response(var _this) native; | |
| 25 | |
| 26 Blob get responseBlob() { return _get_responseBlob(this); } | |
| 27 static Blob _get_responseBlob(var _this) native; | |
| 28 | |
| 29 String get responseText() { return _get_responseText(this); } | |
| 30 static String _get_responseText(var _this) native; | |
| 31 | |
| 32 String get responseType() { return _get_responseType(this); } | |
| 33 static String _get_responseType(var _this) native; | |
| 34 | |
| 35 void set responseType(String value) { _set_responseType(this, value); } | |
| 36 static void _set_responseType(var _this, String value) native; | |
| 37 | |
| 38 Document get responseXML() { return _get_responseXML(this); } | |
| 39 static Document _get_responseXML(var _this) native; | |
| 40 | |
| 41 int get status() { return _get_status(this); } | |
| 42 static int _get_status(var _this) native; | |
| 43 | |
| 44 String get statusText() { return _get_statusText(this); } | |
| 45 static String _get_statusText(var _this) native; | |
| 46 | |
| 47 XMLHttpRequestUpload get upload() { return _get_upload(this); } | |
| 48 static XMLHttpRequestUpload _get_upload(var _this) native; | |
| 49 | |
| 50 bool get withCredentials() { return _get_withCredentials(this); } | |
| 51 static bool _get_withCredentials(var _this) native; | |
| 52 | |
| 53 void set withCredentials(bool value) { _set_withCredentials(this, value); } | |
| 54 static void _set_withCredentials(var _this, bool value) native; | |
| 55 | |
| 56 void abort() { | |
| 57 _abort(this); | |
| 58 return; | |
| 59 } | |
| 60 static void _abort(receiver) native; | |
| 61 | |
| 62 void addEventListener(String type, EventListener listener, [bool useCapture =
null]) { | |
| 63 if (useCapture === null) { | |
| 64 _addEventListener_XMLHttpRequest(this, type, listener); | |
| 65 return; | |
| 66 } else { | |
| 67 _addEventListener_XMLHttpRequest_2(this, type, listener, useCapture); | |
| 68 return; | |
| 69 } | |
| 70 } | |
| 71 static void _addEventListener_XMLHttpRequest(receiver, type, listener) native; | |
| 72 static void _addEventListener_XMLHttpRequest_2(receiver, type, listener, useCa
pture) native; | |
| 73 | |
| 74 bool dispatchEvent(Event evt) { | |
| 75 return _dispatchEvent_XMLHttpRequest(this, evt); | |
| 76 } | |
| 77 static bool _dispatchEvent_XMLHttpRequest(receiver, evt) native; | |
| 78 | |
| 79 String getAllResponseHeaders() { | |
| 80 return _getAllResponseHeaders(this); | |
| 81 } | |
| 82 static String _getAllResponseHeaders(receiver) native; | |
| 83 | |
| 84 String getResponseHeader(String header) { | |
| 85 return _getResponseHeader(this, header); | |
| 86 } | |
| 87 static String _getResponseHeader(receiver, header) native; | |
| 88 | |
| 89 void open(String method, String url, [bool async = null, String user = null, S
tring password = null]) { | |
| 90 if (async === null) { | |
| 91 if (user === null) { | |
| 92 if (password === null) { | |
| 93 _open(this, method, url); | |
| 94 return; | |
| 95 } | |
| 96 } | |
| 97 } else { | |
| 98 if (user === null) { | |
| 99 if (password === null) { | |
| 100 _open_2(this, method, url, async); | |
| 101 return; | |
| 102 } | |
| 103 } else { | |
| 104 if (password === null) { | |
| 105 _open_3(this, method, url, async, user); | |
| 106 return; | |
| 107 } else { | |
| 108 _open_4(this, method, url, async, user, password); | |
| 109 return; | |
| 110 } | |
| 111 } | |
| 112 } | |
| 113 throw "Incorrect number or type of arguments"; | |
| 114 } | |
| 115 static void _open(receiver, method, url) native; | |
| 116 static void _open_2(receiver, method, url, async) native; | |
| 117 static void _open_3(receiver, method, url, async, user) native; | |
| 118 static void _open_4(receiver, method, url, async, user, password) native; | |
| 119 | |
| 120 void overrideMimeType(String override) { | |
| 121 _overrideMimeType(this, override); | |
| 122 return; | |
| 123 } | |
| 124 static void _overrideMimeType(receiver, override) native; | |
| 125 | |
| 126 void removeEventListener(String type, EventListener listener, [bool useCapture
= null]) { | |
| 127 if (useCapture === null) { | |
| 128 _removeEventListener_XMLHttpRequest(this, type, listener); | |
| 129 return; | |
| 130 } else { | |
| 131 _removeEventListener_XMLHttpRequest_2(this, type, listener, useCapture); | |
| 132 return; | |
| 133 } | |
| 134 } | |
| 135 static void _removeEventListener_XMLHttpRequest(receiver, type, listener) nati
ve; | |
| 136 static void _removeEventListener_XMLHttpRequest_2(receiver, type, listener, us
eCapture) native; | |
| 137 | |
| 138 void send([var data = null]) { | |
| 139 if (data === null) { | |
| 140 _send(this); | |
| 141 return; | |
| 142 } else { | |
| 143 if (data is ArrayBuffer) { | |
| 144 _send_2(this, data); | |
| 145 return; | |
| 146 } else { | |
| 147 if (data is Blob) { | |
| 148 _send_3(this, data); | |
| 149 return; | |
| 150 } else { | |
| 151 if (data is Document) { | |
| 152 _send_4(this, data); | |
| 153 return; | |
| 154 } else { | |
| 155 if (data is String) { | |
| 156 _send_5(this, data); | |
| 157 return; | |
| 158 } else { | |
| 159 if (data is DOMFormData) { | |
| 160 _send_6(this, data); | |
| 161 return; | |
| 162 } | |
| 163 } | |
| 164 } | |
| 165 } | |
| 166 } | |
| 167 } | |
| 168 throw "Incorrect number or type of arguments"; | |
| 169 } | |
| 170 static void _send(receiver) native; | |
| 171 static void _send_2(receiver, data) native; | |
| 172 static void _send_3(receiver, data) native; | |
| 173 static void _send_4(receiver, data) native; | |
| 174 static void _send_5(receiver, data) native; | |
| 175 static void _send_6(receiver, data) native; | |
| 176 | |
| 177 void setRequestHeader(String header, String value) { | |
| 178 _setRequestHeader(this, header, value); | |
| 179 return; | |
| 180 } | |
| 181 static void _setRequestHeader(receiver, header, value) native; | |
| 182 | |
| 183 String get typeName() { return "XMLHttpRequest"; } | |
| 184 } | |
| OLD | NEW |