Skip to content
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

Remove Function() invocation from eframe text_agent to bypass "unsafe-eval" restrictions in Chrome browser extensions. #3349

Merged
merged 2 commits into from
Sep 17, 2023

Conversation

aspect
Copy link
Contributor

@aspect aspect commented Sep 16, 2023

This is a small snippet that replaces Function() with call_after_delay() (which was conveniently present a few lines below).

Chrome browser extensions using the latest manifest v3 format do not allow invocation of eval()-like functions (Function belongs to this list of restrictions). As such, loading eframe WASM application within a Chrome browser extension popup will result in Chrome blocking the execution.

After this change, the resulting eframe WASM application powers up as a Chrome browser extension.

@emilk emilk added the eframe Relates to epi and eframe label Sep 17, 2023
@emilk emilk merged commit 9c4f55b into emilk:master Sep 17, 2023
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eframe Relates to epi and eframe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants