From 337589477a09550f8b624ee99b98dd40e4f946aa Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 19 Feb 2017 08:09:55 +0900 Subject: [PATCH] [Client] Refactor: Improve readability --- src/web/app/desktop/scripts/autocomplete.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/web/app/desktop/scripts/autocomplete.js b/src/web/app/desktop/scripts/autocomplete.js index ce8f960168..86f1ae4b33 100644 --- a/src/web/app/desktop/scripts/autocomplete.js +++ b/src/web/app/desktop/scripts/autocomplete.js @@ -10,12 +10,14 @@ class Autocomplete { * 対象のテキストエリアを与えてインスタンスを初期化します。 */ constructor(textarea) { + // BIND --------------------------------- + this.onInput = this.onInput.bind(this); + this.complete = this.complete.bind(this); + this.close = this.close.bind(this); + // -------------------------------------- + this.suggestion = null; this.textarea = textarea; - - this.onInput = this.onInput.bind(this); - this.complete = this.complete.bind(this); - this.close = this.close.bind(this); } /**