This repository has been archived by the owner on Nov 17, 2021. It is now read-only.
Remove the ability to pass a callback function as a string #12
Labels
breaking
Will require a major version bump
This is where we use
new Function
- https://github.com/Financial-Times/o-toggle/blob/master/src/js/toggle.js#L40 - we should avoid usingnew Function
/eval
in Origami components in case the product using Origami has a strict Content-Security-Policy which forbids using these powerful features of the language.We can avoid the use of
new Function
/eval
in this component by changing the option to take a reference to an already existing function that should be executed as the callback.E.G.
The text was updated successfully, but these errors were encountered: