Abstract
Private
_modelsDictionary of model ids and model instance promises
Readonly
comm_The comm target name to register
Protected
Abstract
_create_Create a comm which can be used for communication for a widget.
If the data/metadata is passed in, open the comm before returning (i.e., send the comm_open message). If the data and metadata is undefined, we want to reconstruct a comm that already exists in the kernel, so do not open the comm by sending the comm_open message.
Comm target name
Optional
model_id: stringThe comm id
Optional
data: JSONObjectThe initial data for the comm
Optional
metadata: JSONObjectThe metadata in the open message
Optional
buffers: ArrayBuffer[] | ArrayBufferView[]Protected
Abstract
_get_Protected
_loadProtected
_loadCreates a promise for a view of a given model
The implementation must trigger the Lumino 'after-attach' and 'after-show' events when appropriate, which in turn will trigger the view's 'displayed' events.
Make sure the view creation is not out of order with any state updates.
Optional
options: anyOptional
options: anyProtected
filterGet a promise for a model by model id.
If the model is not found, the returned Promise object is rejected.
If you would like to synchronously test if a model exists, use .has_model().
Asynchronously get the state of the widget manager.
This includes all of the widget models, and follows the format given in the @jupyter-widgets/schema package.
Promise for a state dictionary
The options for what state to return.
Returns true if the given model is registered, otherwise false.
This is a synchronous way to check if a model is registered.
Protected
Abstract
loadLoad a class and return a promise to the loaded object.
Protected
loadProtected
loadCreate and return a promise for a new widget model
widget_manager.new_model({
model_name: 'IntSlider',
model_module: '@jupyter-widgets/controls',
model_module_version: '1.0.0',
model_id: 'u-u-i-d'
}).then((model) => { console.log('Create success!', model); },
(err) => {console.error(err)});
the options for creating the model.
attribute values for the model.
Create a comm and new widget model.
same options as new_model but comm is not required and additional options are available.
serialized model attributes.
Set the widget manager state.
a Javascript object conforming to the application/vnd.jupyter.widget-state+json spec.
Reconstructs all of the widget models in the state, merges that with the current manager state, and then attempts to redisplay the widgets in the state.
Generated using TypeDoc
Manager abstract base class