admin管理员组文章数量:1208155
console.log(alert('WORKING'));
var videoElement = document.getElementsByClassName('video-stream')[0];
videoElement.addEventListener(
'pause',
function(){
alert('paused!');
}
);
I know python but am trying to learn JavaScript. Im practicing by working on a Chrome extension but I'm already stuck.
The first line works I get popup when I open youtube in my chrome browser. But the next line does not. When I pause the video I do not get a popup. But if I copy the same line it into the console in chrome it does work. I will get a popup when I pause.
本文标签: javascriptWhy does my line of code to detect pausing video not workStack Overflow
版权声明:本文标题:javascript - Why does my line of code to detect pausing video not work? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738751511a2110426.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论