本文整理汇总了TypeScript中@jupyterlab/inspector.InspectionHandler类的典型用法代码示例。如果您正苦于以下问题:TypeScript InspectionHandler类的具体用法?TypeScript InspectionHandler怎么用?TypeScript InspectionHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了InspectionHandler类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: InspectionHandler
notebooks.widgetAdded.connect((sender, parent) => {
const session = parent.session;
const rendermime = parent.rendermime;
const handler = new InspectionHandler({ session, rendermime });
// Associate the handler to the widget.
handlers[parent.id] = handler;
// Set the initial editor.
let cell = parent.notebook.activeCell;
handler.editor = cell && cell.editor;
// Listen for active cell changes.
parent.notebook.activeCellChanged.connect((sender, cell) => {
handler.editor = cell && cell.editor;
});
// Listen for parent disposal.
parent.disposed.connect(() => {
delete handlers[parent.id];
handler.dispose();
});
});
示例2:
parent.disposed.connect(() => {
delete handlers[parent.id];
handler.dispose();
});