From reading the doc, my understanding was that the variable “cb_obj” could be always used inside a CustomJS to reference the model that triggered the callback.
However, this doesn’t seem the case when used on a button.js_on_click callback:
In my experience, this is definitely different behavior than other JavaScript callbacks such as js_on_change(), where you can access properties from the cb_obj directly. That said, I do not use the JavaScript callbacks very regularly.
For what it is worth, arrived at this by inspecting the object with Object.getOwnPropertyNames(cb_obj)) in the JavaScript console to see what was actually in cb_obj. So, this is all based on experimentation and nothing in the documentation that I could see, so hopefully the developers can comment on if this is expected or not.