onload event on script object sometimes not triggered
Posted: Mon Jan 31, 2022 8:37 pm
Site to reproduce: https://openmpt.org/screenshots (I maintain this site and all scripts from the site are allowed in NoScript)
This is something that I'm sure used to work just fine with NoScript, but I don't know when exactly it might have broken.
This website loads a JavaScript files with the async attribute (screenshots.min.js) and applies an onload function as soon as the script has finished loading asynchronously. Now if I hit Ctrl+Shift+R in Firefox to force-reload the site, the onload event is never fired (I verified by adding a console.log in the onload handler). If I visit this site by clicking a link from another site instead, or just hitting F5, the onload handler is usually called and the script executes. Disabling NoScript avoids the issue so I'm pretty sure it is caused by NoScript.
This is something that I'm sure used to work just fine with NoScript, but I don't know when exactly it might have broken.
This website loads a JavaScript files with the async attribute (screenshots.min.js) and applies an onload function as soon as the script has finished loading asynchronously. Now if I hit Ctrl+Shift+R in Firefox to force-reload the site, the onload event is never fired (I verified by adding a console.log in the onload handler). If I visit this site by clicking a link from another site instead, or just hitting F5, the onload handler is usually called and the script executes. Disabling NoScript avoids the issue so I'm pretty sure it is caused by NoScript.