| Index: sdk/lib/html/dartium/html_dartium.dart
|
| diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
|
| index b5e82af86a71bcc2b997884742fd66c6ae5d288c..50f679db9b38f03090c607a8279afa3d9126afbb 100644
|
| --- a/sdk/lib/html/dartium/html_dartium.dart
|
| +++ b/sdk/lib/html/dartium/html_dartium.dart
|
| @@ -13736,12 +13736,14 @@ class HttpRequest extends EventTarget {
|
| 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);
|
| + }
|
| }
|
| });
|
|
|
|
|