ramnathv/htmlwidgets — pull request #31 by jcheng5 (2014-11-15 07:39:01+00:00)
Title: Proper non-standard rendering of widget values

We have to work quite hard to temporarily hide widgets while
non-standard values (errors, NULL) are rendered. We do this
to not burden the widget author with having to deal with
state changing between normal and non-standard. If we could
go back and revisit the architecture, maybe it would make
sense to bake the notion of widgets being created and
destroyed into the API itself (meaning initialize would be
split into two callbacks, one for one-time initialization of
a particular output, and another that's called each time we
go from non-standard to standard values).

To see this code in action:

```r
devtools::install_github("rstudio/dygraphs")
shiny::runGist("https://gist.github.com/jcheng5/294fed2dee0d2e607d9a")
```