var animation = new CoreAnimation();
animation.duration = 500;
animation.keyframes = [ {opacity: "1"},{opacity: "0"}];
animation.target = self.myElement;
animation.play();
如何抓住结局事件?
self.myElement.addEventListener('core-animation-finish', function(e) {
console.log('finish!');
});
答案 0 :(得分:3)
这解决了我的问题:
var animation = new CoreAnimation();
animation.duration = 500;
animation.keyframes = [ {opacity: "1"},{opacity: "0"}];
animation.target = this.$.myElement;
animation.play();
animation.addEventListener('core-animation-finish', function(e) {
console.log('finish!');
});