Tag function
Create 'lazily' rendered HTML [tags] (and/or [htmlDependencies()]).
tagFunction(func)
func |
a function with no arguments that returns HTML tags and/or dependencies. |
myDivDep <- tagFunction(function() { if (isTRUE(getOption("useDep", TRUE))) { htmlDependency( name = "lazy-dependency", version = "1.0", src = "" ) } }) myDiv <- attachDependencies(div(), myDivDep) renderTags(myDiv) withr::with_options(list(useDep = FALSE), renderTags(myDiv))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.