| 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 e33d421417b5c54dbd7df861804c9c92101fb578..b398f6ba57bdbcb6af1c704838815e2227912517 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -12793,12 +12793,14 @@ class HttpRequest extends EventTarget native "*XMLHttpRequest" {
|
| xhr.onProgress.listen(onProgress);
|
| }
|
|
|
| - xhr.onLoad.listen((e) {
|
| - if (xhr.status >= 200 && xhr.status < 300 ||
|
| - xhr.status == 304 ) {
|
| - completer.complete(xhr);
|
| - } else {
|
| - completer.completeError(e);
|
| + xhr.onReadyStateChange.listen((e) {
|
| + if (xhr.readyState == HttpRequest.DONE) {
|
| + if (xhr.status >= 200 && xhr.status < 300 ||
|
| + xhr.status == 304 ) {
|
| + completer.complete(xhr);
|
| + } else {
|
| + completer.completeError(e);
|
| + }
|
| }
|
| });
|
|
|
|
|