In Chrome MV3, there is the sandbox feature that allowing JavaScript eval inside the sandbox page.
"sandbox": {
"pages": [
"src/sandbox.html"
]
},
"content_security_policy": {
"sandbox": "sandbox allow-scripts; script-src 'self' 'unsafe-eval'"
}
However it seems not supported in Firefox.
This is a required feature in extension “ScriptCat” for running the code in background.
I expect that I can append an sandbox iframe in Event Page. The sandbox iframe is isolated from all extension APIs and just allow to communicate with the parent frame, so it can do JavaScript eval safely.