Debian Codegraph @

man/registerThemeDependency.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/bootstrap.R
3 \name{registerThemeDependency}
4 \alias{registerThemeDependency}
5 \title{Register a theme dependency}
6 \usage{
7 registerThemeDependency(func)
8 }
9 \arguments{
10 \item{func}{A function that takes one argument, \code{theme} (which is a
11 \code{\link[sass:sass_layer]{sass::sass_layer()}} object), and returns an htmlDependency object, or list
12 of them.}
13 }
14 \description{
15 This function registers a function that returns an
16 \code{\link[htmltools:htmlDependency]{htmltools::htmlDependency()}} or list of such objects. If
17 \code{session$setCurrentTheme()} is called, the function will be re-executed, and
18 the resulting html dependency will be sent to the client.
19 }
20 \details{
21 Note that \code{func} should \strong{not} be an anonymous function, or a function which
22 is defined within the calling function. This is so that,
23 \code{registerThemeDependency()} is called multiple times with the function, it
24 tries to deduplicate them
25 }
26 \keyword{internal}