How to use the @jupyter-widgets/controls.HTMLModel function in @jupyter-widgets/controls

To help you get started, we’ve selected a few @jupyter-widgets/controls examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Who8MyLunch / Jupyter_Video_Widget / js / src / jupyter-video.js View on Github external
var pretty = "00" + number;
    return pretty.substr(pretty.length-size);
}

//-----------------------------------------------

// Widget models must provide default values for the model attributes that are
// different from the base class.  These include at least `_model_name`, `_view_name`,
// `_model_module`, and `_view_module`.  When serialiazing entire widget state for embedding,
// only values different from default will be specified.

console.log(widgets_base);
console.log(widgets_controls);


var TimeCodeModel = widgets_controls.HTMLModel.extend({
    defaults: _.extend(_.result(this, 'widgets.HTMLModel.prototype.defaults'), {
        _model_name:          'TimeCodeModel',
        _model_module:         module_name,
        _model_module_version: module_version,

        _view_name:          'TimeCodeView',
        _view_module:         module_name,
        _view_module_version: module_version,
    })
});


var VideoModel = widgets_base.DOMWidgetModel.extend({
    defaults: _.extend(_.result(this, 'widgets.DOMWidgetModel.prototype.defaults'), {
        _model_name:          'VideoModel',
        _model_module:         module_name,