| Index: tools/dom/templates/html/impl/impl_Event.darttemplate
|
| diff --git a/tools/dom/templates/html/impl/impl_Event.darttemplate b/tools/dom/templates/html/impl/impl_Event.darttemplate
|
| index ef07e13c1cdca386238aa5b5f3202f5500e8ac03..2abce6290b3d4d7d7001c1895477385084d8bae5 100644
|
| --- a/tools/dom/templates/html/impl/impl_Event.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_Event.darttemplate
|
| @@ -50,13 +50,11 @@ $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
|
| 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.');
|
| }
|
| $!MEMBERS
|
| }
|
|
|