-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unsafe-eval
, required for nunjucks and RJSF, isn't allowed in MV3
#4693
Comments
unsafe-eval
, required for nunjucks, isn't allowed in MV3unsafe-eval
, required for nunjucks and RJSF, isn't allowed in MV3
We have a couple options here I think:
I had added this point to the agenda of the w3c kickoff meeting on userscripts, but unfortunately had the drop off the call before it was discussed. I will prioritize clarifying the behavior for MV3 |
Note that neither one is available from the background worker because they either require a full tab or an iframe. Also possible bug that might affect us: SandboxThe sandbox sounds like the right way to do this, either in the content script or page editor:
UserscriptsUnless Userscripts directly support Related: https://developer.chrome.com/docs/extensions/mv3/known-issues/#userscript-managers-support |
I can work on the sandbox issue for this then. I will look into implementing a barebones connectable sandbox, possibly one that pre-loads nunjucks in order to evaluate the templates in it: |
IIRC, we don't evaluate templates from the background page anyway. (The original design always used contentScript due to security/performance reasons) If we do need to run from background page, there's an offscreen documents proposal: w3c/webextensions#170 |
unsafe-eval is available in the sandbox 🎉 |
This line is causing an error for every brick with text input. I don't think there's any way around this, as it's not a CWS-related restriction as previously suggested, but a hardcoded MV3 limitation that blocks
eval
entirely.pixiebrix-extension/src/analysis/analysisVisitors/templateAnalysis.ts
Line 88 in fa9ecc1
Previously mentioned
External links (no solution)
Repro
Build MV3
Open any bricks in the page editor
The text was updated successfully, but these errors were encountered: