Chromium Code Reviews| 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 1b7546435efdb78107705744a9a13371b555f06f..cc8eef3ef8b55d6e3a7dc6e1dd0938bb9e343971 100644 |
| --- a/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate |
| +++ b/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate |
| @@ -122,5 +122,29 @@ $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| return completer.future; |
| } |
| + /** |
| + * Checks to see if the Progress event is supported on the current platform. |
| + */ |
| + static bool get supportsProgressEvent { |
| +$if DART2JS |
| + var xhr = new HttpRequest(); |
| + return JS('bool', '"onprogress" in #', xhr); |
| +$else |
| + return true; |
| +$endif |
| + } |
| + |
| + /** |
| + * Checks to see if the LoadEnd event is supported on the current platform. |
| + */ |
| + static bool get supportsLoadEndEvent { |
|
Emily Fortuna
2013/02/14 23:51:41
can these be added to the table of js_support_chec
|
| +$if DART2JS |
| + var xhr = new HttpRequest(); |
| + return JS('bool', '"onloadend" in #', xhr); |
| +$else |
| + return true; |
| +$endif |
| + } |
| + |
| $!MEMBERS |
| } |