@@ -208,7 +208,6 @@ Dash <- R6::R6Class(
208208
209209 dash_update <- paste0(self $ config $ routes_pathname_prefix , " _dash-update-component" )
210210 route $ add_handler(" post" , dash_update , function (request , response , keys , ... ) {
211-
212211 request <- request_parse_json(request )
213212
214213 if (! " output" %in% names(request $ body )) {
@@ -255,6 +254,9 @@ Dash <- R6::R6Class(
255254 }
256255 }
257256
257+ # set the callback context associated with this invocation of the callback
258+ private $ callback_context_ <- setCallbackContext(request $ body )
259+
258260 output_value <- getStackTrace(do.call(callback , callback_args ),
259261 debug = private $ debug ,
260262 pruned_errors = private $ pruned_errors )
@@ -463,8 +465,22 @@ Dash <- R6::R6Class(
463465 state = state ,
464466 func = func
465467 )
468+
469+ # # register the callback_context elements
470+ # private$callback_context_[[paste(output$id, output$property, sep='.')]] <- list(
471+ # states=setCallbackContext(state),
472+ # triggered=list(),
473+ # inputs=getContextElements(inputs)
474+ # )
466475 },
467476
477+ # ------------------------------------------------------------------------
478+ # request and return callback context
479+ # ------------------------------------------------------------------------
480+ callback_context = function () {
481+ private $ callback_context_
482+ },
483+
468484 # ------------------------------------------------------------------------
469485 # convenient fiery wrappers
470486 # ------------------------------------------------------------------------
@@ -517,7 +533,10 @@ Dash <- R6::R6Class(
517533 # initialize flags for debug mode and stack pruning,
518534 debug = NULL ,
519535 pruned_errors = NULL ,
520-
536+
537+ # callback context
538+ callback_context_ = NULL ,
539+
521540 # fields for tracking HTML dependencies
522541 dependencies = list (),
523542 dependencies_user = list (),
0 commit comments