Using JavaScript to Fire Callbacks

I replied here about how to use a Callback to trigger some Javascript code

In the provided examples, we trigger a JS function that forces the windows to resize after a graph was updated.

I think it might help you.

Do you aim to trigger a callback from a JS script, or to trigger a JS script from a Callback?