我试图更好地了解HTML5视频的事件监听器。我目前正在查看play
and playing
events on W3Schools。 It shows in their onplaying
examples我可以执行以下任一操作:
object.onplaying = function(){myScript};
object.addEventListener("playing", myScript);
他们似乎做的完全一样。是他们还是我应该考虑的细微差别?如果它们完全相同,为什么addEventListener
存在?