Create a web dependency — createWebDependency

v1.7.3|Source: R/html-deps.R

Description

Ensure that a file-based HTML dependency (from the htmltools package) can be served over Shiny's HTTP server. This function works by using addResourcePath() to map the HTML dependency's directory to a URL.

createWebDependency(dependency, scrubFile = TRUE)

Arguments

dependency

A single HTML dependency object, created using htmltools::htmlDependency(). If the src value is named, then href and/or file names must be present.

scrubFile

If TRUE (the default), remove src$file for the dependency. This prevents the local file path from being sent to the client when dynamic web dependencies are used. If FALSE, don't remove src$file. Setting it to FALSE should be needed only in very unusual cases.

Value

A single HTML dependency object that has an href-named element in its src.