support home

Back to website
Welcome
Login  Sign up

script does not invoke load handlers on scriptsadded by JS

If I have a script set up with consent-related classes and attributes in JS. When consent is granted, the script's onload and addEventListener('load') handlers are never used.


I can see why. The activation process "sanitises" the script by copying its attributes to a new script> element and inserting it. I'm not sure why, but it could be to get around a strange browser issue.


But not my load handlers! They've gone.


Despite the fact that I have a workaround, it would be nice if this was the default setting.

  • I am facing the problem with the wuffy player firestick page.

Login or Signup to post a comment