| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // WARNING: Do not edit - generated code. | 5 // WARNING: Do not edit - generated code. |
| 6 | 6 |
| 7 part of $LIBRARYNAME; | 7 part of $LIBRARYNAME; |
| 8 | 8 |
| 9 $!TOPLEVEL |
| 10 |
| 9 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 11 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 10 // In JS, canBubble and cancelable are technically required parameters to | 12 // In JS, canBubble and cancelable are technically required parameters to |
| 11 // init*Event. In practice, though, if they aren't provided they simply | 13 // init*Event. In practice, though, if they aren't provided they simply |
| 12 // default to false (since that's Boolean(undefined)). | 14 // default to false (since that's Boolean(undefined)). |
| 13 // | 15 // |
| 14 // Contrary to JS, we default canBubble and cancelable to true, since that's | 16 // Contrary to JS, we default canBubble and cancelable to true, since that's |
| 15 // what people want most of the time anyway. | 17 // what people want most of the time anyway. |
| 16 factory $CLASSNAME(String type, | 18 factory $CLASSNAME(String type, |
| 17 {bool canBubble: true, bool cancelable: true}) { | 19 {bool canBubble: true, bool cancelable: true}) { |
| 18 return new Event.eventType('Event', type, canBubble: canBubble, | 20 return new Event.eventType('Event', type, canBubble: canBubble, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 var target = this.target; | 53 var target = this.target; |
| 52 var matchedTarget; | 54 var matchedTarget; |
| 53 do { | 55 do { |
| 54 if (target.matches(_selector)) return target; | 56 if (target.matches(_selector)) return target; |
| 55 target = target.parent; | 57 target = target.parent; |
| 56 } while (target != null && target != currentTarget.parent); | 58 } while (target != null && target != currentTarget.parent); |
| 57 throw new StateError('No selector matched for populating matchedTarget.'); | 59 throw new StateError('No selector matched for populating matchedTarget.'); |
| 58 } | 60 } |
| 59 $!MEMBERS | 61 $!MEMBERS |
| 60 } | 62 } |
| OLD | NEW |