Fork me on GitHub

I'm playing with the compiler, trying to see if I can make CLJS's JS closures (created by, for instance, constantly) inspectable. I'm trying to add a getter somewhere in similar to how it is described here:


I've been peppering the body with things like (emitln "this.getX = function () { " expr " };") in various places, to no avail. I always get cljs.user.a.getX is not a function.


I think I'm in the right place, editing the emit-variadic-fn-method. Is that correct? Does anyone have an idea of where I would need to place the getter in order to inspect the value held by the function that constantly returns?