You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and on_msg callback should take a second buffers?: Array<ArrayBuffer> argument:
Of course, shiny doesn't need to implement the Jupyter Widgets Protocol... but I wasn't able to figure out how to pack both JSON-serializable & binary blobs together. Maybe msgpack might be of interest, as long as Shiny as way to send a binary input blob.
EDIT: Taking a closer look, shinywidgets does support sending binary data to the front end (although it does so with base64 encoding the data). I've made a PR #152 to ensure the types are what are expected by widgets.
The text was updated successfully, but these errors were encountered:
It might be useful to throw an error if front-end code tries to ShinyComm.send buffers, since would help end users quickly identify that this is a limitation of shinywidgets support for Jupyter Widgets. That would help avoid end users reporting issues to the widget libraries when buffers are silently deleted.
From manzt/quak#30
Many anywidgets and several traditional Jupyter Widgets rely on Jupyter's support for binary data over the comm.
The message protocol allows sending messages including both JSON serializable and binary blobs together.
Right now
buffers
is ignored inShinyComm.send
:py-shinywidgets/js/src/comm.ts
Line 35 in d86f74b
andon_msg
callback should take a secondbuffers?: Array<ArrayBuffer>
argument:Of course, shiny doesn't need to implement the Jupyter Widgets Protocol... but I wasn't able to figure out how to pack both JSON-serializable & binary blobs together. Maybe msgpack might be of interest, as long as
Shiny
as way to send a binary input blob.EDIT: Taking a closer look, shinywidgets does support sending binary data to the front end (although it does so with base64 encoding the data). I've made a PR #152 to ensure the types are what are expected by widgets.
The text was updated successfully, but these errors were encountered: