add nonce support

This commit is contained in:
sbwalker 2025-03-03 16:49:28 -05:00
parent f315ad1ce9
commit 5b23917940

View File

@ -65,6 +65,7 @@ function injectScript(script) {
newScript.setAttribute(script.attributes[i].name, script.attributes[i].value);
}
}
newScript.nonce = script.nonce; // must be referenced explicitly
newScript.innerHTML = script.innerHTML;
// dynamically injected scripts cannot be async or deferred