| 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 0f07ca96b9208a8af3a36809553888bb23cf3d9d..3307880ea481c3faa44d529021bc9f7b4d8709af 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -13230,7 +13230,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);
|
| }
|
|
|
| /**
|
| @@ -13238,7 +13250,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);
|
| }
|
|
|
|
|
|
|