Fork me on GitHub
#cljs-dev
<
2017-08-21
>
john13:08:25

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 https://github.com/clojure/clojurescript/blob/r1.9.908/src/main/clojure/cljs/compiler.cljc#L767 similar to how it is described here: https://stackoverflow.com/questions/28229561/does-this-getter-setter-closure-have-a-good-reason-to-declare-its-privates-in-i

john13:08:52

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.

john13:08:02

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?