Bug 1453568 - Don't use arrow function for prototype function which uses `this` inside the function. r?birtles
MozReview-Commit-ID: IfF50Q9smDy
--- 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 });