const ExampleWidgetView = widgets.DOMWidgetView.extend({
render: function () {
const cell = this.options.cell;
if (cell && cell.metadata && cell.metadata.foo) {
// The cell has the metadata flag we're looking for, do one thing when rendering the widget
}
else {
// The cell doesn't have the metadata, do another thing when rendering the widget
}
}
});
However, in ipywidgets 7 options.cell is undefined. I've been looking through the code and so far haven't seen an obvious alternative for getting a reference to the Cell object.
Is there another way this can be done?
Thanks!
Thorin