graingert / WOW

Reveal CSS animation as you scroll down a page
https://wowjs.uk
Other
1.58k stars 1.56k forks source link

not working when Content-Security-Policy is implemented #55

Open zwozwo opened 2 years ago

zwozwo commented 2 years ago

hello, can i put the init-Code directly into the js instead in a script tag? wow does not run since i implemented a csp header because the init-code is recognized as an inline script which are ignored. I am not used in js, so, if it is possible, i would need the whole lines to put in with all the ({; and so on Can anybody helpp me? Thanks in advance, Silke

opencoca commented 1 year ago

The following will work if you don't want to inline the loading function and have it in a separate js (like on https://jsbin.com/ or http://codepen.io/).

window.onload = function funLoad() {
  new WOW().init(); 
}