|
@@ -371,4 +371,17 @@ export class DOMConsole {
|
|
|
scheduleNotify () {
|
|
|
this.idleInterval = window.setInterval(this.notifyIdle.bind(this), Config.idle_input_interval);
|
|
|
}
|
|
|
+
|
|
|
+ cancelPendingInputRequests () {
|
|
|
+ this.inputListeners.forEach(resolve => resolve(''));
|
|
|
+ this.inputListeners.splice(0, this.inputListeners.length);
|
|
|
+ if(this.idleInterval != null) {
|
|
|
+ clearInterval(this.idleInterval);
|
|
|
+ this.idleInterval = null;
|
|
|
+ }
|
|
|
+ this.input.value = '';
|
|
|
+ this.inputSpan.innerHTML = '';
|
|
|
+ this.hideInput();
|
|
|
+ this.anyKey = false;
|
|
|
+ }
|
|
|
}
|