| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 dart.html; | 5 part of dart.html; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Helper class to implement custom events which wrap DOM events. | 8 * Helper class to implement custom events which wrap DOM events. |
| 9 * TODO(jacobr): consider using dart JsNative.$setInstanceInterceptor | 9 * TODO(jacobr): consider using dart JsNative.$setInstanceInterceptor |
| 10 * instead of using wrappers as that would allow passing these wrappers | 10 * instead of using wrappers as that would allow passing these wrappers |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 bool get defaultPrevented => wrapped.defaultPrevented; | 30 bool get defaultPrevented => wrapped.defaultPrevented; |
| 31 | 31 |
| 32 int get eventPhase => wrapped.eventPhase; | 32 int get eventPhase => wrapped.eventPhase; |
| 33 | 33 |
| 34 EventTarget get target => wrapped.target; | 34 EventTarget get target => wrapped.target; |
| 35 | 35 |
| 36 int get timeStamp => wrapped.timeStamp; | 36 int get timeStamp => wrapped.timeStamp; |
| 37 | 37 |
| 38 String get type => wrapped.type; | 38 String get type => wrapped.type; |
| 39 | 39 |
| 40 void _initEvent(String eventTypeArg, bool canBubbleArg, | 40 void _initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg) { |
| 41 bool cancelableArg) { | 41 throw new UnsupportedError('Cannot initialize this Event.'); |
| 42 throw new UnsupportedError( | |
| 43 'Cannot initialize this Event.'); | |
| 44 } | 42 } |
| 45 | 43 |
| 46 void preventDefault() { | 44 void preventDefault() { |
| 47 wrapped.preventDefault(); | 45 wrapped.preventDefault(); |
| 48 } | 46 } |
| 49 | 47 |
| 50 void stopImmediatePropagation() { | 48 void stopImmediatePropagation() { |
| 51 wrapped.stopImmediatePropagation(); | 49 wrapped.stopImmediatePropagation(); |
| 52 } | 50 } |
| 53 | 51 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 81 * ## Other resources | 79 * ## Other resources |
| 82 * | 80 * |
| 83 * * [Shadow DOM extensions to | 81 * * [Shadow DOM extensions to |
| 84 * Event](http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-even
t) | 82 * Event](http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-even
t) |
| 85 * from W3C. | 83 * from W3C. |
| 86 */ | 84 */ |
| 87 // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#ex
tensions-to-event | 85 // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#ex
tensions-to-event |
| 88 @Experimental() | 86 @Experimental() |
| 89 List<Node> get path => wrapped.path; | 87 List<Node> get path => wrapped.path; |
| 90 } | 88 } |
| OLD | NEW |