| 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 23314254c91e9493b31d81e6e151ddc8a9f8d174..548fd38e5ba85c696a1a0e6cabfefd36a3969dd6 100644
|
| --- a/sdk/lib/html/dart2js/html_dart2js.dart
|
| +++ b/sdk/lib/html/dart2js/html_dart2js.dart
|
| @@ -10716,13 +10716,11 @@ class Event extends Interceptor native "Event" {
|
| var currentTarget = this.currentTarget;
|
| var target = this.target;
|
| var matchedTarget;
|
| - while (matchedTarget == null && target != currentTarget && target != null) {
|
| - if (target.matches(_selector)) {
|
| - matchedTarget = target;
|
| - }
|
| + do {
|
| + if (target.matches(_selector)) return target;
|
| target = target.parent;
|
| - }
|
| - return matchedTarget;
|
| + } while (target != null && target != currentTarget.parent);
|
| + throw new StateError('No selector matched for populating matchedTarget.');
|
| }
|
| // To suppress missing implicit constructor warnings.
|
| factory Event._() { throw new UnsupportedError("Not supported"); }
|
|
|