| OLD | NEW |
| 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 Loading... |
| 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 }); |
| OLD | NEW |