Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
super.render();
this._outputView = new OutputArea({
rendermime: this.model.widget_manager.renderMime,
contentFactory: OutputArea.defaultContentFactory,
model: this.model.outputs
});
this.pWidget.insertWidget(0, this._outputView);
this.pWidget.addClass('jupyter-widgets');
this.pWidget.addClass('widget-output');
this.update(); // Set defaults.
}
render() {
super.render();
this._outputView = new OutputArea({
rendermime: renderMime,
contentFactory: OutputArea.defaultContentFactory,
model: this.model.outputs
});
this.pWidget.insertWidget(0, this._outputView);
this.pWidget.addClass('jupyter-widgets');
this.pWidget.addClass('widget-output');
this.update(); // Set defaults.
}
render() {
super.render();
this._outputView = new OutputArea({
rendermime: this.model.widget_manager.renderMime,
contentFactory: OutputArea.defaultContentFactory,
model: this.model.outputs,
});
this.pWidget.insertWidget(0, this._outputView);
this.pWidget.addClass("jupyter-widgets");
this.pWidget.addClass("widget-output");
this.update(); // Set defaults.
}
render() {
super.render();
this._outputView = new OutputArea({
rendermime: this.model.widget_manager.rendermime,
contentFactory: OutputArea.defaultContentFactory,
model: this.model.outputs
});
// TODO: why is this a readonly property now?
// this._outputView.model = this.model.outputs;
// TODO: why is this on the model now?
// this._outputView.trusted = true;
this.pWidget.insertWidget(0, this._outputView);
this.pWidget.addClass('jupyter-widgets');
this.pWidget.addClass('widget-output');
this.update(); // Set defaults.
}
it('should take an optional contentFactory', () => {
const contentFactory = Object.create(OutputArea.defaultContentFactory);
const widget = new OutputArea({ rendermime, contentFactory, model });
expect(widget.contentFactory).to.equal(contentFactory);
});
});
it('should be a `contentFactory` instance', () => {
expect(OutputArea.defaultContentFactory).to.be.an.instanceof(
OutputArea.ContentFactory
);
});
});
it('should take an optional contentFactory', () => {
const contentFactory = Object.create(OutputArea.defaultContentFactory);
const widget = new OutputArea({ rendermime, contentFactory, model });
expect(widget.contentFactory).to.equal(contentFactory);
});
});
it('should be a `contentFactory` instance', () => {
expect(OutputArea.defaultContentFactory).to.be.an.instanceof(
OutputArea.ContentFactory
);
});
});