R/shiny.R

Defines functions shinyDep attachShinyJs

Documented in attachShinyJs

#' attach shiny.min.js to html tag
#'
#' @param .tag a shiny tag
#'
#' @return a shiny tag
#' @export
attachShinyJs = function(.tag){
  require(htmltools)
  dep=econWeb::Dependency()
  tagList(
    dep$jquery$onCloud(),
    shinyDep(),
    .tag)
}
shinyDep = function() {
  shinyjsDep = shiny:::shinyDependencies()[[2]]
  shinyjsDep$src = NULL
  shinyjsDep$src$file=system.file("www/shared",package="shiny"
  )
  shinyjsDep
}
tpemartin/econWeb documentation built on Oct. 6, 2022, 1:14 a.m.