Skip to content

Instantly share code, notes, and snippets.

@xiaodaigh
Created October 1, 2013 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiaodaigh/6781015 to your computer and use it in GitHub Desktop.
Save xiaodaigh/6781015 to your computer and use it in GitHub Desktop.
?showReactLog
options(shiny.reactlog=TRUE);
session$sendCustomMessage(type="jsCode",
list(code= paste("$('#",id,"').prop('disabled',true)"
,sep="")))
tags$head(tags$script(HTML('
Shiny.addCustomMessageHandler("jsCode",
function(message) {
console.log(message)
eval(message.code);
}
);
shinyServer(function(input, output, session) {
session$onSessionEnded(function() {
# The session ended
})
})
session$isClosed() method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment