From c984013e1efc86b74035bafc0d668c585ce4fa22 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 19 Aug 2017 14:52:48 -0700 Subject: [PATCH] Remove terminal from other events --- src/Terminal.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/Terminal.ts b/src/Terminal.ts index 90a7a6fab..4c6ba9163 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -511,7 +511,7 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT this.showCursor(); this.restartCursorBlinking.apply(this); // TODO: Why pass terminal here? - this.emit('focus', {terminal: this}); + this.emit('focus'); }); }; @@ -535,7 +535,7 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT this.element.classList.remove('focus'); this.clearCursorBlinkingInterval.apply(this); // TODO: Why pass terminal here? - this.emit('blur', {terminal: this}); + this.emit('blur'); }); } @@ -710,14 +710,8 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT this.textarea.setAttribute('autocapitalize', 'off'); this.textarea.setAttribute('spellcheck', 'false'); this.textarea.tabIndex = 0; - this.textarea.addEventListener('focus', () => { - // TODO: Do we need terminal passed here? - this.emit('focus', {terminal: this}); - }); - this.textarea.addEventListener('blur', () => { - // TODO: Do we need terminal passed here? - this.emit('blur', {terminal: this}); - }); + this.textarea.addEventListener('focus', () => this.emit('focus')); + this.textarea.addEventListener('blur', () => this.emit('blur')); this.helperContainer.appendChild(this.textarea); this.compositionView = document.createElement('div');