Open aoles opened 6 years ago
That sounds like a good idea!
It would be similar to the onevent()
function. The first argument would be the event to listen to, and the second argument could either be an expression or a callback function with a single argument. I don't have any time in the foreseeable future to work on this but I would gladly welcome a PR.
I started work on this in the feature-onshiny
branch if anyone wants to continue. I don't know if I'll finish implementing this.
@daattali Your approach on the feature-onshiny
works for all shiny events except shiny:busy
, shiny:idle
. Any expression called on shiny:idle
will inadvertently make shiny busy and trigger shiny:busy
. There's an infinite recursion. Likewise any expression that's to be called on shiny:busy
will not be evaluated until after shiny is idle.
These should be handled on js itself as that won't make shiny busy and can be executed even when shiny is busy.
Hi Dean, long time no see ;) I can't say that enough: your package is awesome! The only thing I'm currently missing is the support for Shiny events. Right now I'm implementing king of a busy indicator which can be easily set-up with a custom JS code as shown in the example. Yet, it would be really great if something along the following lines would be possible - what do you think?
Cheers, Andrzej