| 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 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Base class that supports listening for and dispatching browser events. | 8 * Base class that supports listening for and dispatching browser events. |
| 9 * | 9 * |
| 10 * Normally events are accessed via the Stream getter: | 10 * Normally events are accessed via the Stream getter: |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 _ptr, webkitEvents[type.toLowerCase()], false); | 80 _ptr, webkitEvents[type.toLowerCase()], false); |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 return new _ElementEventStreamImpl(_ptr, type, false); | 83 return new _ElementEventStreamImpl(_ptr, type, false); |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 | 86 |
| 87 /** | 87 /** |
| 88 * Base class for all browser objects that support events. | 88 * Base class for all browser objects that support events. |
| 89 * | 89 * |
| 90 * Use the [on] property to add, and remove events | 90 * Use the [on] property to add, and remove events (rather than |
| 91 * [$dom_addEventListener] and [$dom_removeEventListener] |
| 91 * for compile-time type checks and a more concise API. | 92 * for compile-time type checks and a more concise API. |
| 92 */ | 93 */ |
| 93 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 94 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 94 | 95 |
| 95 // Custom element created callback. | 96 // Custom element created callback. |
| 96 EventTarget._created(); | 97 EventTarget._created(); |
| 97 | 98 |
| 98 /** | 99 /** |
| 99 * This is an ease-of-use accessor for event streams which should only be | 100 * This is an ease-of-use accessor for event streams which should only be |
| 100 * used when an explicit accessor is not available. | 101 * used when an explicit accessor is not available. |
| 101 */ | 102 */ |
| 102 Events get on => new Events(this); | 103 Events get on => new Events(this); |
| 103 $!MEMBERS | 104 $!MEMBERS |
| 104 } | 105 } |
| OLD | NEW |