when i used user-agents in browser extension environment (manifest v3,execute in background worker):
const userAgent = new UserAgent({deviceCategory: ‘desktop’}).data
i got a error like this :
Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:*".
It looks related to browser content_security_policy ,and chrome does not support to set ‘unsafe-eval’ in extension manifest.json file。
as mentioned above,this library cannot be used in the browser extension environment
when i used user-agents in browser extension environment (manifest v3,execute in background worker):
const userAgent = new UserAgent({deviceCategory: ‘desktop’}).data
i got a error like this :Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:*".
It looks related to browser content_security_policy ,and chrome does not support to set ‘unsafe-eval’ in extension manifest.json file。 as mentioned above,this library cannot be used in the browser extension environment