Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: chrome/browser/resources/settings/languages_page/edit_dictionary_page.js

Issue 2984843003: MD Settings: Convert all usages of .bind(this) to use ES6 arrow function. (Closed)
Patch Set: Resolve conflicts. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 'settings-edit-dictionary-page' is a sub-page for editing 6 * @fileoverview 'settings-edit-dictionary-page' is a sub-page for editing
7 * the "dictionary" of custom words used for spell check. 7 * the "dictionary" of custom words used for spell check.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-edit-dictionary-page', 10 is: 'settings-edit-dictionary-page',
(...skipping 24 matching lines...) Expand all
35 35
36 /** @type {LanguageSettingsPrivate} */ 36 /** @type {LanguageSettingsPrivate} */
37 languageSettingsPrivate: null, 37 languageSettingsPrivate: null,
38 38
39 /** @override */ 39 /** @override */
40 ready: function() { 40 ready: function() {
41 this.languageSettingsPrivate = settings.languageSettingsPrivateApiForTest || 41 this.languageSettingsPrivate = settings.languageSettingsPrivateApiForTest ||
42 /** @type {!LanguageSettingsPrivate} */ 42 /** @type {!LanguageSettingsPrivate} */
43 (chrome.languageSettingsPrivate); 43 (chrome.languageSettingsPrivate);
44 44
45 this.languageSettingsPrivate.getSpellcheckWords(function(words) { 45 this.languageSettingsPrivate.getSpellcheckWords(words => {
46 this.words_ = words; 46 this.words_ = words;
47 }.bind(this)); 47 });
48 48
49 this.languageSettingsPrivate.onCustomDictionaryChanged.addListener( 49 this.languageSettingsPrivate.onCustomDictionaryChanged.addListener(
50 this.onCustomDictionaryChanged_.bind(this)); 50 this.onCustomDictionaryChanged_.bind(this));
51 51
52 // Add a key handler for the paper-input. 52 // Add a key handler for the paper-input.
53 this.$.keys.target = this.$.newWord; 53 this.$.keys.target = this.$.newWord;
54 }, 54 },
55 55
56 /** 56 /**
57 * Check if the new word text-field is empty. 57 * Check if the new word text-field is empty.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 /** 137 /**
138 * Checks if any words exists in the dictionary. 138 * Checks if any words exists in the dictionary.
139 * @private 139 * @private
140 * @return {boolean} 140 * @return {boolean}
141 */ 141 */
142 hasWords_: function() { 142 hasWords_: function() {
143 return this.words_.length > 0; 143 return this.words_.length > 0;
144 } 144 }
145 }); 145 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698