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

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

Issue 12707003: Revert the revert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | sdk/lib/html/dartium/html_dartium.dart » ('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 920c422826b3ecb610c1a1bad6b7f3dc0e65a8c6..53b3e084741eded8863e63e1d84465b0f71a25cb 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -13202,7 +13202,19 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
*/
static bool get supportsProgressEvent {
var xhr = new HttpRequest();
- return JS('bool', '"onprogress" in #', xhr);
+ return JS('bool', '("onprogress" in #)', xhr);
+ }
+
+ /**
+ * Checks to see if the current platform supports making cross origin
+ * requests.
+ *
+ * Note that even if cross origin requests are supported, they still may fail
+ * if the destination server does not support CORS requests.
+ */
+ static bool get supportsCrossOrigin {
+ var xhr = new HttpRequest();
+ return JS('bool', '("withCredentials" in #)', xhr);
}
/**
@@ -13210,7 +13222,7 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
*/
static bool get supportsLoadEndEvent {
var xhr = new HttpRequest();
- return JS('bool', '"onloadend" in #', xhr);
+ return JS('bool', '("onloadend" in #)', xhr);
}
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698