Capture events in shiny.
capture_event(g, event, callback = NULL, when = c("on", "once", "off"))
Name of event to trigger the callback.
A callback function to run when the
When the event should be triggered.
callback function should accept a single
argument; the event data. If no callback function is passed
NULL) then one is generated. The generated callback function
sets a shiny input
<chartId>_<eventName> with the event data.