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 |
| 10 * instead of using wrappers as that would allow passing these wrappers |
| 11 * back through dispatchEvent unlike the current implementation. |
| 12 * See https://github.com/dart-lang/sdk/issues/16869 |
9 */ | 13 */ |
10 class _WrappedEvent implements Event { | 14 class _WrappedEvent implements Event { |
11 /** Needed because KeyboardEvent is implements. | 15 /** Needed because KeyboardEvent is implements. |
12 * TODO(terry): Consider making blink_jsObject private (add underscore) for | |
13 * all blink_jsObject. Then needed private wrap/unwrap_jso | |
14 * functions that delegate to a public wrap/unwrap_jso. | |
15 */ | 16 */ |
16 js.JsObject blink_jsObject; | |
17 | |
18 final Event wrapped; | 17 final Event wrapped; |
19 | 18 |
20 /** The CSS selector involved with event delegation. */ | 19 /** The CSS selector involved with event delegation. */ |
21 String _selector; | 20 String _selector; |
22 | 21 |
23 _WrappedEvent(this.wrapped); | 22 _WrappedEvent(this.wrapped); |
24 | 23 |
25 bool get bubbles => wrapped.bubbles; | 24 bool get bubbles => wrapped.bubbles; |
26 | 25 |
27 bool get cancelable => wrapped.cancelable; | 26 bool get cancelable => wrapped.cancelable; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 * ## Other resources | 81 * ## Other resources |
83 * | 82 * |
84 * * [Shadow DOM extensions to | 83 * * [Shadow DOM extensions to |
85 * Event](http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-even
t) | 84 * Event](http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-even
t) |
86 * from W3C. | 85 * from W3C. |
87 */ | 86 */ |
88 // 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 |
89 @Experimental() | 88 @Experimental() |
90 List<Node> get path => wrapped.path; | 89 List<Node> get path => wrapped.path; |
91 } | 90 } |
OLD | NEW |