Use 'wasm-unsafe-eval' instead of deprecated 'wasm-eval'

Reference:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_webassembly_execution
This commit is contained in:
Raymond Hill 2023-08-18 10:01:08 -04:00
parent 2bbad0c692
commit eb235404bd
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ vAPI.cantWebsocket =
vAPI.canWASM = vAPI.webextFlavor.soup.has('chromium') === false; vAPI.canWASM = vAPI.webextFlavor.soup.has('chromium') === false;
if ( vAPI.canWASM === false ) { if ( vAPI.canWASM === false ) {
const csp = manifest.content_security_policy; const csp = manifest.content_security_policy;
vAPI.canWASM = csp !== undefined && csp.indexOf("'unsafe-eval'") !== -1; vAPI.canWASM = csp !== undefined && csp.indexOf("'wasm-unsafe-eval'") !== -1;
} }
vAPI.supportsUserStylesheets = vAPI.webextFlavor.soup.has('user_stylesheet'); vAPI.supportsUserStylesheets = vAPI.webextFlavor.soup.has('user_stylesheet');