| 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 */ | 9 */ |
| 10 class _WrappedEvent implements Event { | 10 class _WrappedEvent implements Event { |
| 11 final Event wrapped; | 11 final Event wrapped; |
| 12 | 12 |
| 13 /** The CSS selector involved with event delegation. */ | 13 /** The CSS selector involved with event delegation. */ |
| 14 String _selector; | 14 String _selector; |
| 15 | 15 |
| 16 _WrappedEvent(this.wrapped); | 16 _WrappedEvent(this.wrapped); |
| 17 | 17 |
| 18 bool get bubbles => wrapped.bubbles; | 18 bool get bubbles => wrapped.bubbles; |
| 19 | 19 |
| 20 bool get cancelable => wrapped.cancelable; | 20 bool get cancelable => wrapped.cancelable; |
| 21 | 21 |
| 22 EventTarget get currentTarget => wrapped.currentTarget; | 22 EventTarget get currentTarget => wrapped.currentTarget; |
| 23 | 23 |
| 24 List<EventTarget> deepPath() { |
| 25 return wrapped.deepPath(); |
| 26 } |
| 27 |
| 24 bool get defaultPrevented => wrapped.defaultPrevented; | 28 bool get defaultPrevented => wrapped.defaultPrevented; |
| 25 | 29 |
| 26 int get eventPhase => wrapped.eventPhase; | 30 int get eventPhase => wrapped.eventPhase; |
| 27 | 31 |
| 32 bool get isTrusted => wrapped.isTrusted; |
| 33 |
| 34 bool get scoped => wrapped.scoped; |
| 35 |
| 28 EventTarget get target => wrapped.target; | 36 EventTarget get target => wrapped.target; |
| 29 | 37 |
| 30 int get timeStamp => wrapped.timeStamp; | 38 double get timeStamp => wrapped.timeStamp; |
| 31 | 39 |
| 32 String get type => wrapped.type; | 40 String get type => wrapped.type; |
| 33 | 41 |
| 34 void _initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg) { | 42 void _initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg) { |
| 35 throw new UnsupportedError('Cannot initialize this Event.'); | 43 throw new UnsupportedError('Cannot initialize this Event.'); |
| 36 } | 44 } |
| 37 | 45 |
| 38 void preventDefault() { | 46 void preventDefault() { |
| 39 wrapped.preventDefault(); | 47 wrapped.preventDefault(); |
| 40 } | 48 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 * from W3C. | 85 * from W3C. |
| 78 */ | 86 */ |
| 79 // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#ex
tensions-to-event | 87 // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#ex
tensions-to-event |
| 80 @Experimental() | 88 @Experimental() |
| 81 List<Node> get path => wrapped.path; | 89 List<Node> get path => wrapped.path; |
| 82 | 90 |
| 83 dynamic get _get_currentTarget => wrapped._get_currentTarget; | 91 dynamic get _get_currentTarget => wrapped._get_currentTarget; |
| 84 | 92 |
| 85 dynamic get _get_target => wrapped._get_target; | 93 dynamic get _get_target => wrapped._get_target; |
| 86 } | 94 } |
| OLD | NEW |