简体   繁体   中英

How to get unsafe-eval compliant Fabric js and lodash js

Using lodash and fabric js in my application but both are not as per Content Security Policy (CSP).

Showing error as:

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

Is there any way to get CSP compliant lodash and fabric js both?

The new default build of fabricJS has removed named accessors to get rid of some eval.

Fabric cannot be built yet eval safe since patterns and clipTo are not removable.

We are working on it to remove all the functionalities that require code restoring from string and swapping them with something similar but without eval

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM