File: JS.Rd

package info (click to toggle)
r-cran-htmlwidgets 1.6.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 516 kB
  • sloc: javascript: 597; sh: 13; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (4)
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{JS}
\alias{JS}
\title{Mark character strings as literal JavaScript code}
\usage{
JS(...)
}
\arguments{
\item{...}{character vectors as the JavaScript source code (all arguments
will be pasted into one character string)}
}
\description{
This function \code{JS()} marks character vectors with a special class, so
that it will be treated as literal JavaScript code when evaluated on the
client-side.
}
\examples{
library(htmlwidgets)
JS('1 + 1')
list(x = JS('function(foo) {return foo;}'), y = 1:10)
JS('function(x) {', 'return x + 1;', '}')
}
\author{
Yihui Xie
}