mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-07 03:00:20 -04:00
Add shiny:sessionInit event (#1568)
* added a shiny:sessionInit JS event that is triggered at the end of the session's initialize method * new entry * update NEWS * correct version number in NEWS.md * fix typo
This commit is contained in:
committed by
Winston Chang
parent
dae11765bc
commit
cf21e987f2
2
NEWS.md
2
NEWS.md
@@ -7,6 +7,8 @@ shiny 1.0.1.9000
|
||||
### New features
|
||||
### Minor new features and improvements
|
||||
|
||||
* Added a `shiny:sessioninitialized` Javascript event, which is fired at the end of the initialize method of the Session object. This allows us to listen for this event when we want to get the value of things like `Shiny.user`. ([#1568](https://github.com/rstudio/shiny/pull/1568))
|
||||
|
||||
* Fixed [#1649](https://github.com/rstudio/shiny/issues/1649): allow the `choices` argument in `checkboxGroupInput()` to be `NULL` (or `c()`) to keep backward compatibility with Shiny < 1.0.1. This will result in the same thing as providing `choices = character(0)`. ([#1652](https://github.com/rstudio/shiny/pull/1652))
|
||||
|
||||
### Bug fixes
|
||||
|
||||
@@ -1241,6 +1241,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
||||
addMessageHandler('config', function (message) {
|
||||
this.config = { workerId: message.workerId, sessionId: message.sessionId };
|
||||
if (message.user) exports.user = message.user;
|
||||
$(document).trigger('shiny:sessioninitialized');
|
||||
});
|
||||
|
||||
addMessageHandler('busy', function (message) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
inst/www/shared/shiny.min.js
vendored
2
inst/www/shared/shiny.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -631,6 +631,7 @@ var ShinyApp = function() {
|
||||
addMessageHandler('config', function(message) {
|
||||
this.config = {workerId: message.workerId, sessionId: message.sessionId};
|
||||
if (message.user) exports.user = message.user;
|
||||
$(document).trigger('shiny:sessioninitialized');
|
||||
});
|
||||
|
||||
addMessageHandler('busy', function(message) {
|
||||
|
||||
Reference in New Issue
Block a user