|
@@ -6,7 +6,7 @@ import {
|
|
|
} from 'jupyter-js-services';
|
|
|
|
|
|
import {
|
|
|
- clearSignalData
|
|
|
+ clearSignalData, defineSignal, ISignal
|
|
|
} from 'phosphor/lib/core/signaling';
|
|
|
|
|
|
import {
|
|
@@ -146,6 +146,12 @@ class ConsoleWidget extends Widget {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * A signal emitted when the console executes its prompt.
|
|
|
+ */
|
|
|
+ executed: ISignal<ConsoleWidget, Date>;
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* Get the inspection handler used by the console.
|
|
|
*
|
|
@@ -214,6 +220,7 @@ class ConsoleWidget extends Widget {
|
|
|
this.newPrompt();
|
|
|
return prompt.execute(this._session.kernel).then(
|
|
|
(value: KernelMessage.IExecuteReplyMsg) => {
|
|
|
+ this.executed.emit(new Date());
|
|
|
if (!value) {
|
|
|
this._inspectionHandler.handleExecuteReply(null);
|
|
|
return;
|
|
@@ -373,6 +380,11 @@ class ConsoleWidget extends Widget {
|
|
|
private _session: ISession = null;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+// Define the signals for the `ConsoleWidget` class.
|
|
|
+defineSignal(ConsoleWidget.prototype, 'executed');
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* A namespace for ConsoleWidget statics.
|
|
|
*/
|