I want to wait to run Javascript until all Shiny inputs and outputs are bound.
One way to do this is to listen to the “brilliant: connected” event X times, where X is the sum of the inputs and outputs and is known in advance. ( http://shiny.rstudio.com/articles/js-events.html )
But I know that I will forget to change X if I add or remove I / O, so I am trying to do this in a more abstract way.
Is there a short way to check, either from the .R server or in the JS script, did Shiny complete all its binding, not knowing exactly how many inputs / outputs there are?
Please note that “brilliant: simple” even works often before everything is connected, so I don’t think it will work.
source share