Closing out #56, this adds the fix that @giorgi-ghviniashvili mentioned in #70 where the code needs to first check that HTMLWidgets is defined before it can also check that Shiny is defined - HTMLWidgets is always defined when we call the widget in R, since it's created through the HTMLWidgets framework, but it may not be defined when calling the JS code without R, or with other languages, etc, so needs to be checked for :)
Closing out #56, this adds the fix that @giorgi-ghviniashvili mentioned in #70 where the code needs to first check that HTMLWidgets is defined before it can also check that Shiny is defined - HTMLWidgets is always defined when we call the widget in R, since it's created through the HTMLWidgets framework, but it may not be defined when calling the JS code without R, or with other languages, etc, so needs to be checked for :)