Bug 1453568 - Don't use arrow function for prototype function which uses `this` inside the function. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 17 Apr 2018 08:28:49 +0900
changeset 783342 6722e3e218a7043a90a0bb7ecd8e648cccd8430e
parent 783341 8ecd4e30e4a9ec05c5572e9b4bef919ed6504eb7
child 783343 228b21c96667102bdc5a3f7d83195e497abcc901
push id106674
push userhikezoe@mozilla.com
push dateTue, 17 Apr 2018 01:36:18 +0000
reviewersbirtles
bugs1453568
milestone61.0a1
Bug 1453568 - Don't use arrow function for prototype function which uses `this` inside the function. r?birtles MozReview-Commit-ID: IfF50Q9smDy
dom/animation/test/css-animations/test_event-dispatch.html
dom/animation/test/css-transitions/test_event-dispatch.html
--- a/dom/animation/test/css-animations/test_event-dispatch.html
+++ b/dom/animation/test/css-animations/test_event-dispatch.html
@@ -32,17 +32,17 @@ function AnimationEventHandler(target) {
   };
   this.target.onanimationend = evt => {
     this.animationend = evt.elapsedTime;
   };
   this.target.onanimationcancel = evt => {
     this.animationcancel = evt.elapsedTime;
   };
 }
-AnimationEventHandler.prototype.clear = () => {
+AnimationEventHandler.prototype.clear = function() {
   this.animationstart     = undefined;
   this.animationiteration = undefined;
   this.animationend       = undefined;
   this.animationcancel    = undefined;
 }
 
 function setupAnimation(t, animationStyle) {
   const div = addDiv(t, { style: 'animation: ' + animationStyle });
--- a/dom/animation/test/css-transitions/test_event-dispatch.html
+++ b/dom/animation/test/css-transitions/test_event-dispatch.html
@@ -27,17 +27,17 @@ function TransitionEventHandler(target) 
   this.target.ontransitionend = evt => {
     this.transitionend = evt.elapsedTime;
   };
   this.target.ontransitioncancel = evt => {
     this.transitioncancel = evt.elapsedTime;
   };
 }
 
-TransitionEventHandler.prototype.clear = () => {
+TransitionEventHandler.prototype.clear = function() {
   this.transitionrun    = undefined;
   this.transitionstart  = undefined;
   this.transitionend    = undefined;
   this.transitioncancel = undefined;
 };
 
 function setupTransition(t, transitionStyle) {
   const div = addDiv(t, { style: 'transition: ' + transitionStyle });