OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
6 | 6 |
7 /** | 7 /** |
8 * A utility for retrieving data from a URL. | 8 * A utility for retrieving data from a URL. |
9 * | 9 * |
10 * HttpRequest can be used to obtain data from http, ftp, and file | 10 * HttpRequest can be used to obtain data from http, ftp, and file |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 */ | 167 */ |
168 static bool get supportsLoadEndEvent { | 168 static bool get supportsLoadEndEvent { |
169 $if DART2JS | 169 $if DART2JS |
170 var xhr = new HttpRequest(); | 170 var xhr = new HttpRequest(); |
171 return JS('bool', '("onloadend" in #)', xhr); | 171 return JS('bool', '("onloadend" in #)', xhr); |
172 $else | 172 $else |
173 return true; | 173 return true; |
174 $endif | 174 $endif |
175 } | 175 } |
176 | 176 |
| 177 /** |
| 178 * Checks to see if the overrideMimeType method is supported on the current |
| 179 * platform. |
| 180 */ |
| 181 static bool get supportsOverrideMimeType { |
| 182 $if DART2JS |
| 183 var xhr = new HttpRequest(); |
| 184 return JS('bool', '("overrideMimeType" in #)', xhr); |
| 185 $else |
| 186 return true; |
| 187 $endif |
| 188 } |
| 189 |
177 $!MEMBERS | 190 $!MEMBERS |
178 } | 191 } |
OLD | NEW |