How can I, as the widget developer, pass information into the ellipsis argument?
More specifically, suppose I have the following widget definition:
MYWIDGET <- function(data, big = TRUE) {
javascript_data = list()
htmlwidgets::createWidget(name = 'MYWIDGET', x = javascript_data, width = 400, height = 400, big = big)
}
I would want the big argument to be passed to the custom HTML constructor so that I can add an HTML class to the tag. I know I can pass the information into the x parameter, and then deal with it from javascript, but I want to know how to access a variable in the widget's html construction before it gets into the javascript layer.
The documentation shows that it's possible to create a custom HTML container for a widget:
How can I, as the widget developer, pass information into the ellipsis argument?
More specifically, suppose I have the following widget definition:
I would want the
big
argument to be passed to the custom HTML constructor so that I can add an HTML class to the tag. I know I can pass the information into thex
parameter, and then deal with it from javascript, but I want to know how to access a variable in the widget's html construction before it gets into the javascript layer.