Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: client/fling/dist/runtime/apps/adminz/adminz.dart

Issue 8637013: Remove support for attribute event listeners. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/dom/scripts/dartgenerator.py ('k') | client/samples/spirodraw/ColorPicker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/fling/dist/runtime/apps/adminz/adminz.dart
diff --git a/client/fling/dist/runtime/apps/adminz/adminz.dart b/client/fling/dist/runtime/apps/adminz/adminz.dart
index 0dea4b67b8b58d00dcf0f1cdbbf5212b9c2995ed..4176a592a6673d424e2498acc201260f60df5d09 100644
--- a/client/fling/dist/runtime/apps/adminz/adminz.dart
+++ b/client/fling/dist/runtime/apps/adminz/adminz.dart
@@ -14,11 +14,11 @@ class Xhr {
String contentType, XhrCallback onSuccess, XhrCallback onFailure) {
// TODO(knorton): Catch exceptions.
final xhr = new XMLHttpRequest();
- xhr.onreadystatechange = () {
+ final onReadyStateChange = () {
if (xhr.readyState != 4)
return;
- xhr.onreadystatechange = null;
+ xhr.removeEventListener('readystatechange', onReadyStateChange);
if (xhr.status == 200) {
if (onSuccess != null)
onSuccess(xhr);
@@ -27,6 +27,7 @@ class Xhr {
onFailure(xhr);
}
};
+ xhr.addEventListener('readystatechange', onReadyStateChange, true);
xhr.open(method, url, true);
if (contentType == null) {
xhr.setRequestHeader('Content-Type', contentType);
« no previous file with comments | « client/dom/scripts/dartgenerator.py ('k') | client/samples/spirodraw/ColorPicker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698