How to trigger custom JS without invoking it on objects?

Hello, I would like to trigger some custom JS without invoking it on an object. I only found the js_on_change method but I don’t want to create an object for nothing, as my custom JS is not dependent on a widget event/widget itself. Is there any way to accomplish that? Thanks!

There is not. A generic “RPC” mechanism has been proposed in the past, but it’s a slippery slope to a lot of complexity and no one has ever decided to work on it seriously. Turning Bokeh into a full-blown ORB is probably just out of scope. So you will need an object of some sort, to trigger a change or event callback on. Subclassing a DataModel in recent versions of Bokeh is a good option for this.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.