Skip to content

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

Merged
emilk merged 2 commits intoemilk:masterfrom
aspectron:unsafe-eval
Sep 17, 2023
Merged

Remove Function() invocation from eframe text_agent to bypass "unsafe-eval" restrictions in Chrome browser extensions.#3349
emilk merged 2 commits intoemilk:masterfrom
aspectron:unsafe-eval

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
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