Why doesn't document.addEventListener('load', function) work in a greasemonkey script?

前端 未结 5 1565
粉色の甜心
粉色の甜心 2020-12-05 22:32

It doesn\'t give an error, and I put a console.log(\'loaded userscript wifi-autologin\'), the console.log works, but the intended effect of the doc

5条回答
  •  遥遥无期
    2020-12-05 23:15

    Apparently, document.addEventListener() is unreliable, and hence, my error. Use window.addEventListener() with the same parameters, instead.

提交回复
热议问题