We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'd expect this to work, but it currently doesn't:
library(plotly) library(reactR) plot_ly() %>% onRender(babel_transform("gd => console.log(gd)"))
That's because babel_transform() doesn't return a bare function:
babel_transform()
cat(babel_transform("gd => console.log(gd)"))
"use strict"; (function (gd) { return console.log(gd); });
However, HTMLWidgets.evalAndRun assumes we're passing a bare function:
HTMLWidgets.evalAndRun
htmlwidgets/inst/www/htmlwidgets.js
Line 236 in 5db27ad
Seems as though we could support this use case by also trying var taskFunc = eval(task);
var taskFunc = eval(task);
The text was updated successfully, but these errors were encountered:
Try evaling tasks with and without parentheses, closes ramnathv#326
61cf366
add validate argument to onRender() to optionally ensure server-side …
1767b1f
…that jsCode can evaluate to a function, fixes ramnathv#326
Closing in favor of the more specific #329
Sorry, something went wrong.
No branches or pull requests
I'd expect this to work, but it currently doesn't:
That's because
babel_transform()
doesn't return a bare function:cat(babel_transform("gd => console.log(gd)"))
However,
HTMLWidgets.evalAndRun
assumes we're passing a bare function:htmlwidgets/inst/www/htmlwidgets.js
Line 236 in 5db27ad
Seems as though we could support this use case by also trying
var taskFunc = eval(task);
The text was updated successfully, but these errors were encountered: