OLD | NEW |
---|---|
(Empty) | |
1 /* Copyright 2015 The Chromium Authors. All rights reserved. | |
2 * Use of this source code is governed by a BSD-style license that can be | |
3 * found in the LICENSE file. */ | |
4 | |
5 /** | |
6 * @fileoverview | |
7 * `cr-util` provides utility functions for Chrome custom elements. | |
8 * | |
9 * Example: | |
10 * | |
11 * <cr-util></cr-util> | |
12 * | |
13 * @element cr-util | |
Jeremy Klein
2015/02/05 23:42:11
I'd like to keep this name a little bit more well-
michaelpg
2015/02/06 08:55:43
Done.
| |
14 */ | |
15 Polymer({ | |
16 /** | |
17 * Forwards events that don't automatically cross the shadow boundary | |
18 * if the event should bubble. | |
19 * @param {!Event} e The event to forward. | |
20 * @param {*} detail Data passed when initializing the event. | |
21 * @param {Node=} sender Node that declared the handler. | |
22 */ | |
23 forwardEvent: function(e, detail, sender) { | |
24 // TODO | |
Jeremy Klein
2015/02/05 23:42:11
What should this TODO say?
michaelpg
2015/02/06 08:55:43
Fixed
| |
25 if (e.bubbles && sender && | |
26 e.path[e.path.length - 1] == sender.shadowRoot) { | |
27 sender.fire(e.type, detail, e.target, true, e.cancelable); | |
28 } | |
29 }, | |
30 }); | |
OLD | NEW |