New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of Eval in bodymovin.js #289
Comments
Expressions need 'eval' to run. |
Can you explain a bit why |
@koto expressions are basically javascript. I have no other way to support them if I want to keep the player as light as possible. |
@bodymovin We're encountering similar concerns. Might there be a possibility of using |
@rombrom unfortunately |
Figured it would be something related to context. Thanks a lot for the answer! |
Hi folks 👋
Is this still correct? I'm noticing now that the SVG renderer also has some lottie-web/build/player/lottie_svg.js Lines 10028 to 10033 in 1d266d2
Wondering if there are any updated workarounds so we don't have to use |
@talsafran hi, the svg renderer without expressions is the lottie_light version here: |
hi @bodymovin - is Lottie_Light exported from the NPM package? |
@jamiehaywood you, you should be able to access it by traversing the path on your import |
Replacing |
Don't use the lottie with eval airbnb/lottie-web#289
On line 11211 of bodymovin.js (https://github.com/bodymovin/bodymovin/blob/master/build/player/bodymovin.js), an eval is used in the code
var fn = eval('[function(){' + val+';this.v = $bm_rt;}' + ']')[0];
I'd like to use the library, but we have a policy to not use code that includes evals. Is it possible to refactor this to avoid the use of the eval?
Thank you!
The text was updated successfully, but these errors were encountered: