JohnCoene / javascript-for-r-comments

1 stars 0 forks source link

htmlwidgets::JS #20

Open MayaGans opened 3 years ago

MayaGans commented 3 years ago

Nonetheless, it is doable with htmlwidgets’ serialiser (and only that one). The function htmlwidgets::JS can be used to mark a character vector so that it will be treated as JavaScript code when evaluated in the browser. ....This can be useful where the library requires the use of callback functions for instance.

Would it be possible to give a more specific example than saying "This can be useful where the library requires the use of callback functions for instance."? I think it'd be helpful for me to "see" a use case

JohnCoene commented 3 years ago

Yes, it's honestly just laziness on my part 🥺.

It's worse than it looks because it comes in as a lifesaver every now and then: I'll definitely add more details on that!