scijs / ndarray

📈 Multidimensional arrays for JavaScript
MIT License
1.21k stars 61 forks source link

Cannot use in manifest v3 chrome extension because it uses new Function #48

Open ledlamp opened 1 week ago

ledlamp commented 1 week ago

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'".

evaluating javascript code in chrome extension is not allowed so it is impossible to use this in chrome extension :(

kgryte commented 1 week ago

@ledlamp You could use @stdlib/ndarray-ctor which doesn't use code evaluation. If you are needing to use specific scijs functionality, you'll need to write a small adapter, as the array objects are not directly compatible.