Note: This feature is available in Web Workers.
The documentURI read-only property of the SecurityPolicyViolationEvent interface is a string representing the URI of the document or worker in which the Content Security Policy (CSP) violation occurred.
A string representing the URI of the document or worker in which the violation occurred.
document.addEventListener("securitypolicyviolation", (e) => {
console.log(e.documentURI);
});