| Index: tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
|
| diff --git a/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate b/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
|
| index eb6f2a943d8f0112772b3895649b0cefa602a03f..b57794c18ef849cf8307d59ee738662409a2636a 100644
|
| --- a/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
|
| @@ -128,7 +128,23 @@ $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
|
| static bool get supportsProgressEvent {
|
| $if DART2JS
|
| var xhr = new HttpRequest();
|
| - return JS('bool', '"onprogress" in #', xhr);
|
| + return JS('bool', '("onprogress" in #)', xhr);
|
| +$else
|
| + return true;
|
| +$endif
|
| + }
|
| +
|
| + /**
|
| + * 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 {
|
| +$if DART2JS
|
| + var xhr = new HttpRequest();
|
| + return JS('bool', '("withCredentials" in #)', xhr);
|
| $else
|
| return true;
|
| $endif
|
| @@ -140,7 +156,7 @@ $endif
|
| static bool get supportsLoadEndEvent {
|
| $if DART2JS
|
| var xhr = new HttpRequest();
|
| - return JS('bool', '"onloadend" in #', xhr);
|
| + return JS('bool', '("onloadend" in #)', xhr);
|
| $else
|
| return true;
|
| $endif
|
|
|