title: is it able to use CustomJS callback when using bokeh periodic_callback
body: <p>I am able to update GeoJSONDataSource using bokeh CustomJS, however, when using periodic_callback, I can't use CustomJS as the callback function. Below is my code with the error message &quot;TypeError: 'CustomJS' object is not callable&quot;</p>
  <pre><code>current_year = 1800
  n_slider = Slider(start=1, end=50, value=1, step=1, title=&quot;N&quot;)
  toggle = Toggle(label=&quot;Play&quot;, button_type=&quot;success&quot;)
  callback = CustomJS(args=dict(source=source, year=current_year, n_slider=n_slider, toggle=toggle), code=&quot;&quot;&quot;
      data = source.data;
      console.log(toggle.active)
      console.log(n_slider.value)
      console.log(year)
      year = year +1
      // edit GeoJSONDataSource
      source.change.emit();
  &quot;&quot;&quot;)
  
  curdoc().add_root(column(p, n_slider, toggle))
  curdoc().add_periodic_callback(callback, 1000)
  
  </code></pre>
  <p>My question is,</p>
  <p>Is it possible to use a CustomJS as the callback function of periodic_callback, if not, how can I edit the GeoJSONDataSource entry using the normal python function?</p>