js_eval | R Documentation |
Evaluate a piece of JavaScript code in a disposable context.
js_eval(text)
text |
JavaScript code |
# Stateless evaluation
js_eval("(function() {return 'foo'})()")
# Use V8 for stateful evaluation
ct <- V8::new_context()
ct$eval("var foo = 123")
ct$get("foo")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.