We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5fce565 commit 6d9a3a5Copy full SHA for 6d9a3a5
js/src/comm.ts
@@ -32,6 +32,7 @@ export class ShinyComm {
32
const msg = {
33
content: {comm_id: this.comm_id, data: data},
34
metadata: metadata,
35
+ // TODO: need to _encode_ any buffers into base64 (JSON.stringify just drops them)
36
buffers: buffers || [],
37
// this doesn't seem relevant to the widget?
38
header: {}
js/src/utils.ts
@@ -5,7 +5,7 @@ import { decode } from 'base64-arraybuffer';
5
// along to the comm logic
6
function jsonParse(x: string) {
7
const msg = JSON.parse(x);
8
- msg.buffers = msg.buffers.map((b: any) => new DataView(decode(b)));
+ msg.buffers = msg.buffers.map((base64: string) => new DataView(decode(base64)));
9
return msg;
10
}
11
0 commit comments