Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
activate: (
_: JupyterFrontEnd,
statusBar: IStatusBar,
docManager: IDocumentManager,
labShell: ILabShell
) => {
const saving = new SavingStatus({ docManager });
// Keep the currently active widget synchronized.
saving.model!.widget = labShell.currentWidget;
labShell.currentChanged.connect(() => {
saving.model!.widget = labShell.currentWidget;
});
statusBar.registerStatusItem(savingStatusPlugin.id, {
item: saving,
align: 'middle',
isActive: () => true,
activeStateChanged: saving.model!.stateChanged
});
}
};
activate: (
_: JupyterFrontEnd,
statusBar: IStatusBar,
docManager: IDocumentManager,
labShell: ILabShell
) => {
const saving = new SavingStatus({ docManager });
// Keep the currently active widget synchronized.
saving.model!.widget = labShell.currentWidget;
labShell.currentChanged.connect(() => {
saving.model!.widget = labShell.currentWidget;
});
statusBar.registerStatusItem(savingStatusPlugin.id, {
item: saving,
align: 'middle',
isActive: () => true,
activeStateChanged: saving.model!.stateChanged
});
}
};