Skip to content

Avoid eval by doing the reverse of "stringified function" + eval

Fabian Vogt requested to merge work/fvogt/lessevalhack into master

Instead of writing a function in a string and evaling it later, just define the function as usual and call it directly. The string representation necessary for use with executeScript is acquired by calling .toString() on the function.

Merge request reports