1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-18 02:41:37 +02:00

Adding default animationEnd to play nice with JSDom

This commit is contained in:
Antonio Laguna
2017-06-17 16:23:37 +02:00
parent 05db02495c
commit da61aed18b

View File

@@ -89,7 +89,7 @@ export default class DOM {
return animationEvent;
}
animationEvent = '';
animationEvent = 'animationend';
const el = optEl || document.createElement('ws');
const animations = {
@@ -101,11 +101,12 @@ export default class DOM {
const animationNames = Object.keys(animations);
for (let i = 0, length = animationNames.length;
i < length && !animationEvent; i++) {
i < length; i++) {
const animationName = animationNames[i];
if (typeof el.style[animationName] !== 'undefined') {
animationEvent = animations[animationName];
break;
}
}