Skip to content

Commit

Permalink
Send models-request message
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Nov 9, 2021
1 parent ab545bd commit 72ba1b9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/voila/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,12 @@ export class WidgetManager extends JupyterLabManager {
'jupyter.widget.control',
commId,
{ widgets: null },
{ 'version': '1.0.0' }
{ version: '1.0.0' }
);

// Send a models request msg
initComm.send({type: 'models-request'}, {});

let [widgetsInfo, buffers]: any = await new Promise(resolve => {
initComm.on_msg(msg => {
const info = msg['content']['data'];
Expand All @@ -212,7 +215,8 @@ export class WidgetManager extends JupyterLabManager {
} else {
return new DataView(b instanceof ArrayBuffer ? b : b.buffer);
}
});
});

resolve([info, buffers]);
});
});
Expand Down

0 comments on commit 72ba1b9

Please sign in to comment.