3 MoreRouting
.ContextAware
= {
7 this._makeRoutingReady();
11 * Calls `routingReady`, and ensures that it is called in a top-down manner.
13 * We need to be sure that parent nodes have `routingReady` triggered before
14 * their children so that they can properly configure nested routes.
16 * Unfortunately, `ready` is sometimes bottom-up, sometimes top-down.
17 * Ideally, this wouldn't be necessary.
19 * @see https://github.com/Polymer/polymer/pull/1448
21 _makeRoutingReady: function() {
22 if (this.routingIsReady
) return;
25 while (node
= Polymer
.dom(node
).parentNode
) {
26 if (typeof node
._makeRoutingReady
=== 'function') break;
28 if (node
) node
._makeRoutingReady();
30 this.parentRoute
= this._findParentRoute();
31 this.routingIsReady
= true;
32 if (typeof this.routingReady
=== 'function') this.routingReady();
35 _findParentRoute: function() {
38 node
= Polymer
.dom(node
).parentNode
;
39 if (node
&& node
.nodeType
!== Node
.ELEMENT_NODE
) {
43 var route
= node
&& node
.moreRouteContext
;
44 if (route
instanceof MoreRouting
.Route
) {