jimmynotjim / scrollnav

A dependency free JavaScript plugin for auto generating single page navigation
http://scrollnav.com
MIT License
461 stars 127 forks source link

avoid innerHTML in order to pass strict CSP-Header #107

Open makrohard opened 3 years ago

makrohard commented 3 years ago

With a strict Content-Security-Policy Header: require-trusted-types-for 'script', the browser will not run scrollnav without a valid policy, because of the use of innerHTML. This can easily be replaced by appendChild.

jimmynotjim commented 3 years ago

Hey @makrohard really sorry about missing this, I don't get to work on this plugin much any more. I'm open to a PR if you have the time. Otherwise I'll try to get to it but no promises, my work and family life have unfortunately made it difficult to work on open source these days.

makrohard commented 3 years ago

see #108