Polymer animationend的自定义元素侦听器

Polymer animationend的自定义元素侦听器,polymer,polymer-1.0,Polymer,Polymer 1.0,animationend的监听器可以这样做吗 下面的侦听器animationend不是从我的自定义关键帧激发的。激发涟漪{动画:涟漪0.65s线性;}; @关键帧纹波{ /*将元素缩放到250%,以安全地覆盖整个链接并将其淡出*/ 100%{不透明度:1;变换:比例(2.5);} } 我可以做el.addEventListener('animationend')…,但我正在努力保持它的常规 注意:我知道关于paper ripple,我是故意使用我自己的ripple的我想我的第一个问题是,你

animationend
的监听器可以这样做吗

下面的侦听器
animationend
不是从我的自定义关键帧
激发的。激发涟漪{动画:涟漪0.65s线性;}
@关键帧纹波{
/*将元素缩放到250%,以安全地覆盖整个链接并将其淡出*/
100%{不透明度:1;变换:比例(2.5);}
}



我可以做
el.addEventListener('animationend')…
,但我正在努力保持它的常规


注意:我知道关于paper ripple,我是故意使用我自己的ripple的

我想我的第一个问题是,你是否检查了animationend事件是否真的触发了?换句话说,el.addEventListener方法有效吗?旁注,你可能想使用Polymer dom API包装器。即
Polymer.dom(rippleElement).classList.remove('fire-ripple');
Polymer的shady dom(shadow dom的一种轻型polyfil)需要使用Polymer API才能正常工作。请参见此处:
      listeners: { 'animationend': 'removeRipple' },
      removeRipple: function() {
        rippleElement = document.getElementById('ripple-element');
        rippleElement.classList.remove('fire-ripple');
      },