Add R notification functions

This commit is contained in:
Winston Chang
2016-03-21 16:44:04 -05:00
parent 1b39184e98
commit ecb59e9c31
6 changed files with 182 additions and 0 deletions

View File

@@ -468,6 +468,15 @@ var ShinyApp = function() {
}
});
addMessageHandler('notification', function(message) {
if (message.type === 'show')
exports.notifications.show(message.message);
else if (message.type === 'remove')
exports.notifications.remove(message.message);
else
throw('Unkown notification type: ' + message.type);
});
addMessageHandler('response', function(message) {
var requestId = message.tag;
var request = this.$activeRequests[requestId];