If you want to ensure that every message gets sent to Shiny, even if the value you want to send is the same as before, then a simple solution can be to simply include a random value in the message (along with the real message). By adding some random component to the message, it means that every call will be different, and it will always trigger an update in Shiny. Simply change
Shiny.onInputChange(name, value) to
Shiny.onInputChange(name, [value, Math.random()]) and in R instead of listening to
input$name you need to use
input$name. Essentially what we're doing is pass a 2-element vector, where the first element is the actual value we're interested in and the second element is just some random number.