invoke_method <- function(widget, method_name, ...) {
pos <- length(widget$x$calls) + 1
widget$x$calls[[pos]] <- list(
methodName = method_name,
args = list(...) %>%
purrr::compact()
)
widget
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.