callback handlers specific to a view
Optional
view: WidgetViewCreates a promise for a view of a given model
Make sure the view creation is not out of order with any state updates.
Optional
options: unknownOptional
options: unknownGet a promise for a model by model id.
If a model is not found, undefined is returned (NOT a promise). However, the calling code should also deal with the case where a rejected promise is returned, and should treat that also as a model not found.
Returns true if the given model is registered, otherwise false.
This is a synchronous way to check if a model is registered.
Create 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.
Optional
serialized_state: JSONObjectattribute 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.
Optional
serialized_state: JSONObjectserialized model attributes.
Register a model instance promise with the manager.
By registering the model, it can later be retrieved with get_model
.
Generated using TypeDoc
The widget manager interface exposed on the Widget instances