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
# These are *protocol* versions for each package, *not* npm versions. To check, look at each package's src/version.ts file for the protocol version the package implements.
Copy file name to clipboardExpand all lines: packages/schema/messages.md
+41
Original file line number
Diff line number
Diff line change
@@ -338,3 +338,44 @@ To display a widget, the kernel sends a Jupyter [iopub `display_data` message](h
338
338
}
339
339
}
340
340
```
341
+
342
+
343
+
344
+
345
+
# Control Widget messaging protocol, version 1.0
346
+
347
+
This is implemented in ipywidgets 7.7.
348
+
349
+
### The `jupyter.widget.control` comm target
350
+
351
+
A kernel-side Jupyter widgets library registers a `jupyter.widget.control` comm target that is used for fetching all widgets states through a "one shot" comm message (one for all widget instances). Unlike the `jupyter.widget` comm target, the created comm is global to all widgets,
352
+
353
+
#### State requests: `request_states`
354
+
355
+
When a frontend wants to request the full state of a all widgets, the frontend sends a `request_states` message:
356
+
357
+
```
358
+
{
359
+
'comm_id' : 'u-u-i-d',
360
+
'data' : {
361
+
'method': 'request_states'
362
+
}
363
+
}
364
+
```
365
+
366
+
The kernel side of the widget should immediately send an `update_states` message with all widgets states:
367
+
368
+
```
369
+
{
370
+
'comm_id' : 'u-u-i-d',
371
+
'data' : {
372
+
'method': 'update_states',
373
+
'states': {
374
+
<widget1 u-u-i-d>: <widget1 state>,
375
+
<widget2 u-u-i-d>: <widget2 state>,
376
+
[...]
377
+
},
378
+
'buffer_paths': [ <list with paths corresponding to the binary buffers> ]
0 commit comments