File: remove_typedarray_polyfill.Rd

package info (click to toggle)
r-cran-plotly 4.9.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 26,616 kB
  • sloc: javascript: 137,775; sh: 20; makefile: 6
file content (32 lines) | stat: -rw-r--r-- 862 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotly.R
\name{remove_typedarray_polyfill}
\alias{remove_typedarray_polyfill}
\title{Remove TypedArray polyfill}
\usage{
remove_typedarray_polyfill(p)
}
\arguments{
\item{p}{a plotly object}
}
\description{
By default, plotly.js' TypedArray polyfill is included as a dependency, so
printing "just works" in any context. Many users won't need this polyfill,
so this function may be used to remove it and thus reduce the size of the page.
}
\details{
The polyfill seems to be only relevant for those rendering plots
via phantomjs and RStudio on some Windows platforms.
}
\examples{

\dontrun{
p1 <- plot_ly()
p2 <- remove_typedarray_polyfill(p1)
t1 <- tempfile(fileext = ".html")
htmlwidgets::saveWidget(p1, t1)
file.info(t1)$size
htmlwidgets::saveWidget(p2, t1)
file.info(t1)$size
}
}