-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Remove str-to-func eval of named function factory #17296
Conversation
return the object key [name] as caller.name of the new function
Looks like this causes errors on tests on CI. Let us know if you need help debugging those. |
#endif | ||
return { | ||
[name]: function () { | ||
return body.apply(body, arguments); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, your pull request is very helpful for me.
but I don't understand why use "body.apply(body, arguments);" in here rather than "body.apply(this, arguments);".
In my case , I change createNamedFunction used "body.apply(body, arguments)" had some error.
but "body.apply(this, arguments)" is work for me.
anyway, thank you so much again,you save me to solu the CSP trouble!!
I'd think we should move forward with this patch. I tested it locally with @NickCarducci do you have time to update this PR or should I upload a new one? |
For support for this feature see: ttps://caniuse.com/mdn-javascript_operators_object_initializer_computed_property_names Based on #17296
For support for this feature see: ttps://caniuse.com/mdn-javascript_operators_object_initializer_computed_property_names Based on #17296
I don't want to be a collaborator based on this, at least. |
For support for this feature see: ttps://caniuse.com/mdn-javascript_operators_object_initializer_computed_property_names Based on #17296
For support for this feature see: https://caniuse.com/mdn-javascript_operators_object_initializer_computed_property_names Based on #17296 Co-authored-by: Nick Carducci <nmcarducci@gmail.com>
return the object key [name] as caller.name of the new function