mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-07 03:00:20 -04:00
Use new message format for progress reporting
This commit is contained in:
@@ -419,7 +419,12 @@ ShinySession <- setRefClass(
|
||||
|
||||
.progressKeys <<- c(.progressKeys, id)
|
||||
|
||||
json <- toJSON(list(progress=list(id)))
|
||||
json <- toJSON(list(
|
||||
progress = list(
|
||||
type = 'binding',
|
||||
id = id
|
||||
)
|
||||
))
|
||||
|
||||
.write(json)
|
||||
},
|
||||
|
||||
@@ -887,8 +887,8 @@
|
||||
|
||||
addMessageHandler('progress', function(message) {
|
||||
$(document.documentElement).addClass('shiny-busy');
|
||||
for (var i = 0; i < message.length; i++) {
|
||||
var key = message[i];
|
||||
if (message.type === 'binding') {
|
||||
var key = message.id;
|
||||
var binding = this.$bindings[key];
|
||||
if (binding && binding.showProgress) {
|
||||
binding.showProgress(true);
|
||||
|
||||
Reference in New Issue
Block a user