$(function () {
// handles shinyapps.io
var workerId = $('base').attr('href');
// ensure that this code does not locally
if (typeof workerId != "undefined") {
var pathname = window.location.pathname;
var newpath = pathname + workerId;
window.history.replaceState( {} , 'newpath', newpath);
}
// From this we can recover the workerId and the sessionId. sessionId
// is the same recovered on the server side with session$token.
$(document).on('shiny:sessioninitialized', function(event) {
Shiny.setInputValue('shinyInfo', Shiny.shinyapp.config);
});
// Returns the last input changed (name, value, type, ...)
$(document).on('shiny:inputchanged', function(event) {
Shiny.setInputValue('lastInputChanged', {name: event.name, value: event.value, type: event.binding.name.split('.')[1]});
});
This file has been truncated. show original