window.onload is randomly emitted or not
Hello. I have content-script that adds some html onto page when it is loaded. It worked fine on all websites where content-scripts are allowed but now I made new version of my addon. Now websites forget to emit window.onload event sometimes. However I always get print in console written with console.log()
placed outside of any functions in the same js file. If I disable new version and go to previous, the problem disappears. What could happen?
Here is new version and previous version of code.