You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script... #1489
Hi. I use Alasql with Teampermonkey, and in certains sites I got this error from console:
Uncaught 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' '*' 'unsafe-inline' *.gstatic.com *.google.com *.googleapis.com *.bootstrapcdn.com".
Looks like the Content Security Policy in many websites doesn't allow to use unsafe eval, so Alasql doesnt't work there.
Unsafe eval is the core of how AlaSQL is structured.
In theory you can alasql.compile what you need and extract the generated function and manage how the function gets the data it needs and then manually move the functions over and use as part of your code instead of AlaSQL, but its not a pleasant experience.
Activity
mathiasrw commentedon Sep 24, 2022
Unsafe eval is the core of how AlaSQL is structured.
In theory you can alasql.compile what you need and extract the generated function and manage how the function gets the data it needs and then manually move the functions over and use as part of your code instead of AlaSQL, but its not a pleasant experience.
githorse commentedon Feb 19, 2024
Dupllicates #1482.