| 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);
|
| }
|
|
|
|
|
|
|