daattali / shinyjs

💡 Easily improve the user experience of your Shiny apps in seconds
https://deanattali.com/shinyjs
Other
734 stars 119 forks source link

runjs output to R? #242

Closed samssann closed 3 years ago

samssann commented 3 years ago

Could it be possible to run queries with runjs() and return output to R?

daattali commented 3 years ago

Runjs is a one way street, it just sends a command to javascript. You can't directly di what you want.

There is no way to "capture" the output of a specific block of code that is run using runjs, but you can use the showLog function to print the jacacript log messages in the R console. You may be able to use that for your purposes. But in general, no what you want is not supported