|
@@ -287,6 +287,7 @@ export abstract class ABCWidgetFactory<
|
|
|
this._modelName = options.modelName || 'text';
|
|
|
this._preferKernel = !!options.preferKernel;
|
|
|
this._canStartKernel = !!options.canStartKernel;
|
|
|
+ this._shutdownOnClose = !!options.shutdownOnClose;
|
|
|
this._toolbarFactory = options.toolbarFactory;
|
|
|
}
|
|
|
|
|
@@ -368,6 +369,16 @@ export abstract class ABCWidgetFactory<
|
|
|
return this._canStartKernel;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Whether the kernel should be shutdown when the widget is closed.
|
|
|
+ */
|
|
|
+ get shutdownOnClose(): boolean {
|
|
|
+ return this._shutdownOnClose;
|
|
|
+ }
|
|
|
+ set shutdownOnClose(value: boolean) {
|
|
|
+ this._shutdownOnClose = value;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Create a new widget given a document model and a context.
|
|
|
*
|
|
@@ -414,6 +425,7 @@ export abstract class ABCWidgetFactory<
|
|
|
private _name: string;
|
|
|
private _readOnly: boolean;
|
|
|
private _canStartKernel: boolean;
|
|
|
+ private _shutdownOnClose: boolean;
|
|
|
private _preferKernel: boolean;
|
|
|
private _modelName: string;
|
|
|
private _fileTypes: string[];
|