Fixed scripts could not be enabled on file: SVG documents.

This commit is contained in:
hackademix 2019-11-25 10:55:32 +01:00
parent fd7718e6f8
commit cc87b48861
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ class DocumentCSP {
let {document} = this;
if (!(document instanceof HTMLDocument)) {
// this is not HTML, hence we cannot inject a <meta> CSP
if (!capabilites.has("script")) {
if (!capabilities.has("script")) {
// safety net for XML (especially SVG) documents
document.defaultView.addEventListener("beforescriptexecute",
e => e.preventDefault(), true);