registerThemeDependency: Register a theme dependency

View source: R/bootstrap.R

registerThemeDependencyR Documentation

Register a theme dependency

Description

This function registers a function that returns an htmltools::htmlDependency() or list of such objects. If session$setCurrentTheme() is called, the function will be re-executed, and the resulting html dependency will be sent to the client.

Usage

registerThemeDependency(func)

Arguments

func

A function that takes one argument, theme (which is a sass::sass_layer() object), and returns an htmlDependency object, or list of them.

Details

Note that func should not be an anonymous function, or a function which is defined within the calling function. This is so that, registerThemeDependency() is called multiple times with the function, it tries to deduplicate them


shiny documentation built on Sept. 11, 2024, 7:24 p.m.