Merge pull request #5137 from sbwalker/dev

add nonce support
This commit is contained in:
Shaun Walker 2025-03-03 16:49:41 -05:00 committed by GitHub
commit d136f8ac91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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