ramnathv / htmlwidgets

HTML Widgets for R
http://htmlwidgets.org
Other
790 stars 207 forks source link

how to handle callback / post-render behaviors ? #65

Open timelyportfolio opened 9 years ago

timelyportfolio commented 9 years ago

Do we expect htmlwidgets to handle callback or other post-render behaviors, or should we expect widget authors to handle on their end? dygraphs handles very nicely. I wonder though given potential lack of Javascript knowledge on the part of some widget authors (like me :)) if we can establish some best practices for this. See https://github.com/rich-iannone/DiagrammeR/pull/10.

jjallaire commented 9 years ago

I think widget authors need to handle this. We've given them the JS function and some examples of it's use, hopefully that (and pull requests from us!) will be enough to get people pointed in the right direction.

On Mon, Jan 5, 2015 at 4:45 PM, timelyportfolio notifications@github.com wrote:

Do we expect htmlwidgets to handle callback or other post-render behaviors, or should we expect widget authors to handle on their end? dygraphs handles very nicely. I wonder though given potential lack of Javascript knowledge on the part of some widget authors if we can establish some best practices for this. See rich-iannone/DiagrammeR#10 https://github.com/rich-iannone/DiagrammeR/pull/10.

— Reply to this email directly or view it on GitHub https://github.com/ramnathv/htmlwidgets/issues/65.

timelyportfolio commented 9 years ago

I agree for now, but the one situation where dealing with this at the individual widget level might be problematic will be a page with multiple htmlwidgets from multiple packages where the package authors differ in their implementation or do not implement. Then, finding when all widgets are built will be troublesome.