本文整理匯總了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();
});