No, the onload event for a script element is only triggered once when the script is initially loaded. If you want to execute code every time the src is modified, you would need to use a different approach, such as periodically checking the src with a timer or using a library that handles dynamic script loading such as RequireJS.
Asked: 2023-03-14 11:00:00 +0000
Seen: 8 times
Last updated: Dec 13 '22