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

Side by Side Diff: chrome/browser/resources/settings/animation/animation.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 Simplified API wrapping native Web Animations with some sugar. 6 * @fileoverview Simplified API wrapping native Web Animations with some sugar.
7 * A compromise between the draft spec and Chrome's evolving support. This API 7 * A compromise between the draft spec and Chrome's evolving support. This API
8 * will be changed (or removed) as Chrome support evolves. 8 * will be changed (or removed) as Chrome support evolves.
9 */ 9 */
10 cr.define('settings.animation', function() { 10 cr.define('settings.animation', function() {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 cancel: function() { 73 cancel: function() {
74 assert(this.animation_); 74 assert(this.animation_);
75 this.animation_.cancel(); 75 this.animation_.cancel();
76 }, 76 },
77 77
78 /** 78 /**
79 * @param {!Event} e 79 * @param {!Event} e
80 * @private 80 * @private
81 */ 81 */
82 queueDispatch_: function(e) { 82 queueDispatch_: function(e) {
83 setTimeout(function() { 83 setTimeout(() => {
84 this.dispatchEvent(e); 84 this.dispatchEvent(e);
85 this.animation_ = undefined; 85 this.animation_ = undefined;
86 }.bind(this)); 86 });
87 }, 87 },
88 }; 88 };
89 89
90 return { 90 return {
91 Animation: Animation, 91 Animation: Animation,
92 Timing: Timing, 92 Timing: Timing,
93 }; 93 };
94 }); 94 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698