☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Order of events

Community Support
WWatson
WWatson

Quick question: if two event listeners are added, both for the same event but one using JS and the other Python, is there an order in which they will trigger? For instance, if I have a button with js_on_click and on_click, in what order will they trigger? In my brief testing it appears as though JS events will trigger first, followed by Python callbacks (regardless of the order in which they were added). Is this behavior guaranteed, or might there be a hidden race occurring?

⌁   Link to post
Bryan
Bryan

This is not defined. In practice, given that a Python trip requires a network round-trip and exectution of Python code, I would generally expect the JS callback to execute first (~immediately). But there are probably ways in which this can fail to be true, and we do not make any guarantees either way.

⌁   Link to post

End of archived discussion · Replies are disabled