I'm upgrading my chrome extension to manifest version 3. But, my extension uses eval in its content script. In version 3 I get the following error
Error in event handler: EvalError: 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'".
I was able to fix this in version 2 as follows:
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'"
But this has changed and I tried many things
"content_security_policy": {
"script-src": "self unsafe-eval",
"unsafe-eval": "object-src self",
"unsafe-inline": "self"
}
I'm not sure what exactly is possible here, so any help would be appreciated