Remove code created using eval

499 views Asked by At

I wonder how it is possible, to remove code that was created using eval. I am aware using eval is not best practice. Anyway...

Let's say I have the following variable: var code = '...'; In "code" some Variables are created and a click Listener is attached to a button. Then I say eval(code). This works fine so far.

Unfortunately I did not find any way to "unbind" the click listener or delete the variables. It would be great, if all the code created with eval, could be deleted at once. Any suggestions?

0

There are 0 answers