Polymer 聚合父级上的子级附加事件侦听器

Polymer 聚合父级上的子级附加事件侦听器,polymer,polymer-1.0,Polymer,Polymer 1.0,我想在我的子元素连接到父元素后,对其调用公共api方法。我尝试使用父附加事件,但它在子附加事件之前调用。尝试过这样的连接事件,但不起作用 <my-element on-attached="childAttached"></my-element> 有并没有一种聚合物的解决方案,我能看到的唯一解决方案是,一旦孩子被附身,我就提出我自己的事件 this.fire('child-attached'); <my-element on-child-attached="ch

我想在我的子元素连接到父元素后,对其调用公共api方法。我尝试使用父附加事件,但它在子附加事件之前调用。尝试过这样的连接事件,但不起作用

<my-element on-attached="childAttached"></my-element>

有并没有一种聚合物的解决方案,我能看到的唯一解决方案是,一旦孩子被附身,我就提出我自己的事件

this.fire('child-attached');
<my-element on-child-attached="childAttached"></my-element>
this.fire('child-attached');

如果在子元素中调用
this.fire('child-attached')
,那么绑定应该是

<my-element on-child-attached="childAttached"></my-element>


假设
childAttached()
是父对象上的一个方法。

当然我知道,但我的问题是。这是唯一的方法,比如,提出我自己的活动并将其连接起来。没有连接到默认连接的事件,没有连接到
事件
attached
只是一个生命周期回调-在组件未连接时调用组件上的
attached()