remove_typedarray_polyfill: Remove TypedArray polyfill

Description Usage Arguments Details Examples

View source: R/plotly.R

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.

Usage

1

Arguments

p

a plotly object

Details

The polyfill seems to be only relevant for those rendering plots via phantomjs and RStudio on some Windows platforms.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
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

## End(Not run)

moupegnoukevin/plotly documentation built on Dec. 21, 2021, 9:07 p.m.