Aliases: tagFunction
Keywords:
### ** Examples myDivDep <- tagFunction(function() { if (isTRUE(getOption("useDep", TRUE))) { htmlDependency( name = "lazy-dependency", version = "1.0", src = "" ) } }) myDiv <- attachDependencies(div(), myDivDep) renderTags(myDiv)
$head $singletons character(0) $dependencies $dependencies[[1]] List of 10 $ name : chr "lazy-dependency" $ version : chr "1.0" $ src :List of 1 ..$ file: chr "" $ meta : NULL $ script : NULL $ stylesheet: NULL $ head : NULL $ attachment: NULL $ package : NULL $ all_files : logi TRUE - attr(*, "class")= chr "html_dependency" $html <div></div>
withr::with_options(list(useDep = FALSE), renderTags(myDiv))
$head $singletons character(0) $dependencies list() $html <div></div>