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

Unified Diff: chrome/browser/resources/settings/settings_page/settings_section.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/settings_page/settings_section.js
diff --git a/chrome/browser/resources/settings/settings_page/settings_section.js b/chrome/browser/resources/settings/settings_page/settings_section.js
index 0265b83585fcfc0ce3c29230063a5577937054bb..9cacbfef2f772e9fb6d21686f4fe2a6a37aa1847 100644
--- a/chrome/browser/resources/settings/settings_page/settings_section.js
+++ b/chrome/browser/resources/settings/settings_page/settings_section.js
@@ -142,15 +142,15 @@ var SettingsSectionElement = Polymer({
this.animateCard_('fixed', startTop, endTop, startHeight, endHeight);
animation.finished
.then(
- function() {
+ () => {
this.classList.add('expanded');
- }.bind(this),
+ },
function() {})
- .then(function() {
+ .then(() => {
// Unset these changes whether the animation finished or canceled.
this.classList.remove('expanding');
this.style.height = '';
- }.bind(this));
+ });
return animation;
},
@@ -223,15 +223,15 @@ var SettingsSectionElement = Polymer({
animation.finished
.then(
- function() {
+ () => {
this.classList.remove('expanded');
- }.bind(this),
+ },
function() {})
- .then(function() {
+ .then(() => {
// The card now determines the section's height automatically.
this.style.height = '';
this.classList.remove('collapsing');
- }.bind(this));
+ });
return animation;
},

Powered by Google App Engine
This is Rietveld 408576698