Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 23454012: Adding conversion support for JSON XHR requests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « no previous file | tests/html/html.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 9d221b16bd2d08ad8a1280257e08d23a4fdc71af..df4deec3c1841bd8001cfca8f78f338155d5afa5 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -13099,6 +13099,8 @@ class HttpRequest extends XmlHttpRequestEventTarget native "XMLHttpRequest" {
@DocsEditable()
final int readyState;
+ dynamic get response => _convertNativeToDart_XHR_Response(this._get_response);
+ @JSName('response')
/**
* The data received as a reponse from the request.
*
@@ -13113,7 +13115,7 @@ class HttpRequest extends XmlHttpRequestEventTarget native "XMLHttpRequest" {
@SupportedBrowser(SupportedBrowser.IE, '10')
@SupportedBrowser(SupportedBrowser.SAFARI)
@Creates('ByteBuffer|Blob|Document|=Object|JSExtendableArray|String|num')
- final Object response;
+ final dynamic _get_response;
/**
* The response in string form or `null on failure.
@@ -31837,6 +31839,13 @@ EventTarget _convertDartToNative_EventTarget(e) {
return e;
}
}
+
+_convertNativeToDart_XHR_Response(o) {
+ if (o is Document) {
+ return o;
+ }
+ return convertNativeToDart_SerializedScriptValue(o);
+}
// Copyright (c) 2013, 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.
« no previous file with comments | « no previous file | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698