Eval in observable

Hello here,
I am trying to do the following:

I want to have a cell with a codemirror/textarea that containts some javascript and when I save it, that function is run in observable to compute some variables.

However, when I try do run “eval”, I get:

a = TypeError: eval(...) is not a function

Any way I can achieve this?

This post describes a trick to get eval to work. Basically you have to wrap eval like this:

(1, eval)(string_to_eval)

We had some success with it in this other thread.