Don't send local package path to client when using htmlwidgets (#1756)

* Don't send local package path to client when using htmlwidgets. Fixes #1755

* Add scrubFile option
This commit is contained in:
Winston Chang
2017-06-22 13:16:19 -05:00
committed by GitHub
parent 376d3b6e91
commit ea685a5686
3 changed files with 23 additions and 6 deletions

View File

@@ -4,12 +4,18 @@
\alias{createWebDependency}
\title{Create a web dependency}
\usage{
createWebDependency(dependency)
createWebDependency(dependency, scrubFile = TRUE)
}
\arguments{
\item{dependency}{A single HTML dependency object, created using
\code{\link[htmltools]{htmlDependency}}. If the \code{src} value is named, then
\code{href} and/or \code{file} names must be present.}
\code{\link[htmltools]{htmlDependency}}. If the \code{src} value is named,
then \code{href} and/or \code{file} names must be present.}
\item{scrubFile}{If TRUE (the default), remove \code{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
\code{src$file}. Setting it to FALSE should be needed only in very unusual
cases.}
}
\value{
A single HTML dependency object that has an \code{href}-named element