Index: lib/html/dartium/html_dartium.dart |
=================================================================== |
--- lib/html/dartium/html_dartium.dart (revision 10850) |
+++ lib/html/dartium/html_dartium.dart (working copy) |
@@ -20674,7 +20674,7 @@ |
// WARNING: Do not edit - generated code. |
-class _XMLHttpRequestExceptionImpl extends NativeFieldWrapperClass1 implements XMLHttpRequestException { |
+class _XMLHttpRequestExceptionImpl extends NativeFieldWrapperClass1 implements HttpRequestException { |
int get code() native "XMLHttpRequestException_code_Getter"; |
@@ -20689,21 +20689,21 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-class _XMLHttpRequestFactoryProvider { |
- factory XMLHttpRequest() => _createXMLHttpRequest(); |
- static XMLHttpRequest _createXMLHttpRequest() native "XMLHttpRequest_constructor_Callback"; |
+class _HttpRequestFactoryProvider { |
+ factory HttpRequest() => _createHttpRequest(); |
+ static HttpRequest _createHttpRequest() native "XMLHttpRequest_constructor_Callback"; |
- factory XMLHttpRequest.get(String url, |
- onSuccess(XMLHttpRequest request)) => |
- _XMLHttpRequestUtils.get(url, onSuccess, false); |
+ factory HttpRequest.get(String url, |
+ onSuccess(HttpRequest request)) => |
+ _HttpRequestUtils.get(url, onSuccess, false); |
- factory XMLHttpRequest.getWithCredentials(String url, |
- onSuccess(XMLHttpRequest request)) => |
- _XMLHttpRequestUtils.get(url, onSuccess, true); |
+ factory HttpRequest.getWithCredentials(String url, |
+ onSuccess(HttpRequest request)) => |
+ _HttpRequestUtils.get(url, onSuccess, true); |
} |
-class _XMLHttpRequestEventsImpl extends _EventsImpl implements XMLHttpRequestEvents { |
- _XMLHttpRequestEventsImpl(_ptr) : super(_ptr); |
+class _HttpRequestEventsImpl extends _EventsImpl implements HttpRequestEvents { |
+ _HttpRequestEventsImpl(_ptr) : super(_ptr); |
EventListenerList get abort() => this['abort']; |
@@ -20725,10 +20725,10 @@ |
// WARNING: Do not edit - generated code. |
-class _XMLHttpRequestImpl extends _EventTargetImpl implements XMLHttpRequest { |
+class _XMLHttpRequestImpl extends _EventTargetImpl implements HttpRequest { |
- _XMLHttpRequestEventsImpl get on() => |
- new _XMLHttpRequestEventsImpl(this); |
+ _HttpRequestEventsImpl get on() => |
+ new _HttpRequestEventsImpl(this); |
int get readyState() native "XMLHttpRequest_readyState_Getter"; |
@@ -20746,7 +20746,7 @@ |
String get statusText() native "XMLHttpRequest_statusText_Getter"; |
- XMLHttpRequestUpload get upload() native "XMLHttpRequest_upload_Getter"; |
+ HttpRequestUpload get upload() native "XMLHttpRequest_upload_Getter"; |
bool get withCredentials() native "XMLHttpRequest_withCredentials_Getter"; |
@@ -20779,7 +20779,7 @@ |
// WARNING: Do not edit - generated code. |
-class _XMLHttpRequestProgressEventImpl extends _ProgressEventImpl implements XMLHttpRequestProgressEvent { |
+class _XMLHttpRequestProgressEventImpl extends _ProgressEventImpl implements HttpRequestProgressEvent { |
int get position() native "XMLHttpRequestProgressEvent_position_Getter"; |
@@ -20787,8 +20787,8 @@ |
} |
-class _XMLHttpRequestUploadEventsImpl extends _EventsImpl implements XMLHttpRequestUploadEvents { |
- _XMLHttpRequestUploadEventsImpl(_ptr) : super(_ptr); |
+class _HttpRequestUploadEventsImpl extends _EventsImpl implements HttpRequestUploadEvents { |
+ _HttpRequestUploadEventsImpl(_ptr) : super(_ptr); |
EventListenerList get abort() => this['abort']; |
@@ -20808,10 +20808,10 @@ |
// WARNING: Do not edit - generated code. |
-class _XMLHttpRequestUploadImpl extends _EventTargetImpl implements XMLHttpRequestUpload { |
+class _XMLHttpRequestUploadImpl extends _EventTargetImpl implements HttpRequestUpload { |
- _XMLHttpRequestUploadEventsImpl get on() => |
- new _XMLHttpRequestUploadEventsImpl(this); |
+ _HttpRequestUploadEventsImpl get on() => |
+ new _HttpRequestUploadEventsImpl(this); |
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "XMLHttpRequestUpload_addEventListener_Callback"; |
@@ -28220,12 +28220,193 @@ |
HtmlElement(); |
} |
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+// WARNING: Do not edit - generated code. |
+ |
+/// @domName XMLHttpRequest |
+interface HttpRequest extends EventTarget default _HttpRequestFactoryProvider { |
+ HttpRequest.get(String url, onSuccess(HttpRequest request)); |
+ |
+ HttpRequest.getWithCredentials(String url, onSuccess(HttpRequest request)); |
+ |
+ HttpRequest(); |
+ |
+ /** |
+ * @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent |
+ */ |
+ HttpRequestEvents get on(); |
+ |
+ static final int DONE = 4; |
+ |
+ static final int HEADERS_RECEIVED = 2; |
+ |
+ static final int LOADING = 3; |
+ |
+ static final int OPENED = 1; |
+ |
+ static final int UNSENT = 0; |
+ |
+ /** @domName XMLHttpRequest.readyState */ |
+ final int readyState; |
+ |
+ /** @domName XMLHttpRequest.response */ |
+ final Object response; |
+ |
+ /** @domName XMLHttpRequest.responseText */ |
+ final String responseText; |
+ |
+ /** @domName XMLHttpRequest.responseType */ |
+ String responseType; |
+ |
+ /** @domName XMLHttpRequest.responseXML */ |
+ final Document responseXML; |
+ |
+ /** @domName XMLHttpRequest.status */ |
+ final int status; |
+ |
+ /** @domName XMLHttpRequest.statusText */ |
+ final String statusText; |
+ |
+ /** @domName XMLHttpRequest.upload */ |
+ final HttpRequestUpload upload; |
+ |
+ /** @domName XMLHttpRequest.withCredentials */ |
+ bool withCredentials; |
+ |
+ /** @domName XMLHttpRequest.abort */ |
+ void abort(); |
+ |
+ /** @domName XMLHttpRequest.addEventListener */ |
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]); |
+ |
+ /** @domName XMLHttpRequest.dispatchEvent */ |
+ bool $dom_dispatchEvent(Event evt); |
+ |
+ /** @domName XMLHttpRequest.getAllResponseHeaders */ |
+ String getAllResponseHeaders(); |
+ |
+ /** @domName XMLHttpRequest.getResponseHeader */ |
+ String getResponseHeader(String header); |
+ |
+ /** @domName XMLHttpRequest.open */ |
+ void open(String method, String url, [bool async, String user, String password]); |
+ |
+ /** @domName XMLHttpRequest.overrideMimeType */ |
+ void overrideMimeType(String override); |
+ |
+ /** @domName XMLHttpRequest.removeEventListener */ |
+ void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]); |
+ |
+ /** @domName XMLHttpRequest.send */ |
+ void send([data]); |
+ |
+ /** @domName XMLHttpRequest.setRequestHeader */ |
+ void setRequestHeader(String header, String value); |
+} |
+ |
+interface HttpRequestEvents extends Events { |
+ |
+ EventListenerList get abort(); |
+ |
+ EventListenerList get error(); |
+ |
+ EventListenerList get load(); |
+ |
+ EventListenerList get loadEnd(); |
+ |
+ EventListenerList get loadStart(); |
+ |
+ EventListenerList get progress(); |
+ |
+ EventListenerList get readyStateChange(); |
+} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
// WARNING: Do not edit - generated code. |
+/// @domName XMLHttpRequestException |
+interface HttpRequestException { |
+ |
+ static final int ABORT_ERR = 102; |
+ |
+ static final int NETWORK_ERR = 101; |
+ |
+ /** @domName XMLHttpRequestException.code */ |
+ final int code; |
+ |
+ /** @domName XMLHttpRequestException.message */ |
+ final String message; |
+ |
+ /** @domName XMLHttpRequestException.name */ |
+ final String name; |
+ |
+ /** @domName XMLHttpRequestException.toString */ |
+ String toString(); |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+// WARNING: Do not edit - generated code. |
+ |
+/// @domName XMLHttpRequestProgressEvent |
+interface HttpRequestProgressEvent extends ProgressEvent { |
+ |
+ /** @domName XMLHttpRequestProgressEvent.position */ |
+ final int position; |
+ |
+ /** @domName XMLHttpRequestProgressEvent.totalSize */ |
+ final int totalSize; |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+// WARNING: Do not edit - generated code. |
+ |
+/// @domName XMLHttpRequestUpload |
+interface HttpRequestUpload extends EventTarget { |
+ |
+ /** |
+ * @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent |
+ */ |
+ HttpRequestUploadEvents get on(); |
+ |
+ /** @domName XMLHttpRequestUpload.addEventListener */ |
+ void $dom_addEventListener(String type, EventListener listener, [bool useCapture]); |
+ |
+ /** @domName XMLHttpRequestUpload.dispatchEvent */ |
+ bool $dom_dispatchEvent(Event evt); |
+ |
+ /** @domName XMLHttpRequestUpload.removeEventListener */ |
+ void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]); |
+} |
+ |
+interface HttpRequestUploadEvents extends Events { |
+ |
+ EventListenerList get abort(); |
+ |
+ EventListenerList get error(); |
+ |
+ EventListenerList get load(); |
+ |
+ EventListenerList get loadEnd(); |
+ |
+ EventListenerList get loadStart(); |
+ |
+ EventListenerList get progress(); |
+} |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+// WARNING: Do not edit - generated code. |
+ |
/// @domName IDBAny |
interface IDBAny { |
} |
@@ -39379,193 +39560,12 @@ |
/** @domName WorkerNavigator.userAgent */ |
final String userAgent; |
} |
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
-// for details. All rights reserved. Use of this source code is governed by a |
-// BSD-style license that can be found in the LICENSE file. |
- |
-// WARNING: Do not edit - generated code. |
- |
-/// @domName XMLHttpRequest |
-interface XMLHttpRequest extends EventTarget default _XMLHttpRequestFactoryProvider { |
- XMLHttpRequest.get(String url, onSuccess(XMLHttpRequest request)); |
- |
- XMLHttpRequest.getWithCredentials(String url, onSuccess(XMLHttpRequest request)); |
- |
- XMLHttpRequest(); |
- |
- /** |
- * @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent |
- */ |
- XMLHttpRequestEvents get on(); |
- |
- static final int DONE = 4; |
- |
- static final int HEADERS_RECEIVED = 2; |
- |
- static final int LOADING = 3; |
- |
- static final int OPENED = 1; |
- |
- static final int UNSENT = 0; |
- |
- /** @domName XMLHttpRequest.readyState */ |
- final int readyState; |
- |
- /** @domName XMLHttpRequest.response */ |
- final Object response; |
- |
- /** @domName XMLHttpRequest.responseText */ |
- final String responseText; |
- |
- /** @domName XMLHttpRequest.responseType */ |
- String responseType; |
- |
- /** @domName XMLHttpRequest.responseXML */ |
- final Document responseXML; |
- |
- /** @domName XMLHttpRequest.status */ |
- final int status; |
- |
- /** @domName XMLHttpRequest.statusText */ |
- final String statusText; |
- |
- /** @domName XMLHttpRequest.upload */ |
- final XMLHttpRequestUpload upload; |
- |
- /** @domName XMLHttpRequest.withCredentials */ |
- bool withCredentials; |
- |
- /** @domName XMLHttpRequest.abort */ |
- void abort(); |
- |
- /** @domName XMLHttpRequest.addEventListener */ |
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]); |
- |
- /** @domName XMLHttpRequest.dispatchEvent */ |
- bool $dom_dispatchEvent(Event evt); |
- |
- /** @domName XMLHttpRequest.getAllResponseHeaders */ |
- String getAllResponseHeaders(); |
- |
- /** @domName XMLHttpRequest.getResponseHeader */ |
- String getResponseHeader(String header); |
- |
- /** @domName XMLHttpRequest.open */ |
- void open(String method, String url, [bool async, String user, String password]); |
- |
- /** @domName XMLHttpRequest.overrideMimeType */ |
- void overrideMimeType(String override); |
- |
- /** @domName XMLHttpRequest.removeEventListener */ |
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]); |
- |
- /** @domName XMLHttpRequest.send */ |
- void send([data]); |
- |
- /** @domName XMLHttpRequest.setRequestHeader */ |
- void setRequestHeader(String header, String value); |
-} |
- |
-interface XMLHttpRequestEvents extends Events { |
- |
- EventListenerList get abort(); |
- |
- EventListenerList get error(); |
- |
- EventListenerList get load(); |
- |
- EventListenerList get loadEnd(); |
- |
- EventListenerList get loadStart(); |
- |
- EventListenerList get progress(); |
- |
- EventListenerList get readyStateChange(); |
-} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
// WARNING: Do not edit - generated code. |
-/// @domName XMLHttpRequestException |
-interface XMLHttpRequestException { |
- |
- static final int ABORT_ERR = 102; |
- |
- static final int NETWORK_ERR = 101; |
- |
- /** @domName XMLHttpRequestException.code */ |
- final int code; |
- |
- /** @domName XMLHttpRequestException.message */ |
- final String message; |
- |
- /** @domName XMLHttpRequestException.name */ |
- final String name; |
- |
- /** @domName XMLHttpRequestException.toString */ |
- String toString(); |
-} |
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
-// for details. All rights reserved. Use of this source code is governed by a |
-// BSD-style license that can be found in the LICENSE file. |
- |
-// WARNING: Do not edit - generated code. |
- |
-/// @domName XMLHttpRequestProgressEvent |
-interface XMLHttpRequestProgressEvent extends ProgressEvent { |
- |
- /** @domName XMLHttpRequestProgressEvent.position */ |
- final int position; |
- |
- /** @domName XMLHttpRequestProgressEvent.totalSize */ |
- final int totalSize; |
-} |
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
-// for details. All rights reserved. Use of this source code is governed by a |
-// BSD-style license that can be found in the LICENSE file. |
- |
-// WARNING: Do not edit - generated code. |
- |
-/// @domName XMLHttpRequestUpload |
-interface XMLHttpRequestUpload extends EventTarget { |
- |
- /** |
- * @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent |
- */ |
- XMLHttpRequestUploadEvents get on(); |
- |
- /** @domName XMLHttpRequestUpload.addEventListener */ |
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]); |
- |
- /** @domName XMLHttpRequestUpload.dispatchEvent */ |
- bool $dom_dispatchEvent(Event evt); |
- |
- /** @domName XMLHttpRequestUpload.removeEventListener */ |
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]); |
-} |
- |
-interface XMLHttpRequestUploadEvents extends Events { |
- |
- EventListenerList get abort(); |
- |
- EventListenerList get error(); |
- |
- EventListenerList get load(); |
- |
- EventListenerList get loadEnd(); |
- |
- EventListenerList get loadStart(); |
- |
- EventListenerList get progress(); |
-} |
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
-// for details. All rights reserved. Use of this source code is governed by a |
-// BSD-style license that can be found in the LICENSE file. |
- |
-// WARNING: Do not edit - generated code. |
- |
/// @domName XMLSerializer |
interface XMLSerializer default _XMLSerializerFactoryProvider { |
@@ -40386,20 +40386,20 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-class _XMLHttpRequestUtils { |
+class _HttpRequestUtils { |
- // Helper for factory XMLHttpRequest.get |
- static XMLHttpRequest get(String url, |
- onSuccess(XMLHttpRequest request), |
+ // Helper for factory HttpRequest.get |
+ static HttpRequest get(String url, |
+ onSuccess(HttpRequest request), |
bool withCredentials) { |
- final request = new XMLHttpRequest(); |
+ final request = new HttpRequest(); |
request.open('GET', url, true); |
request.withCredentials = withCredentials; |
// Status 0 is for local XHR request. |
request.on.readyStateChange.add((e) { |
- if (request.readyState == XMLHttpRequest.DONE && |
+ if (request.readyState == HttpRequest.DONE && |
(request.status == 200 || request.status == 0)) { |
onSuccess(request); |
} |