1 year ago

#260005

test-img

Shaw Donaire

Alasql - Manifest V3 migration error - doesn't allow content scripts to use eval() and friends

I'm having trouble executing eval() and friends for alasql, it is not supported to manifest v3 migration for chrome extension. Based from their Manifest V3 migration checklist:

You can no longer execute external logic using chrome.scripting.executeScript({code: '...'}), eval(), and new Function().

And got this error:

Uncaught (in promise) 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'".

Alasql is using the 'new Function()' class/method thingy, and it causes error in manifest v3.

Does anyone have encountered the same issue?

google-chrome-extension

chrome-extension-manifest-v3

alasql

0 Answers

Your Answer

Accepted video resources