mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-21 20:35:31 +02:00
Adding default animationEnd to play nice with JSDom
This commit is contained in:
@@ -89,7 +89,7 @@ export default class DOM {
|
|||||||
return animationEvent;
|
return animationEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
animationEvent = '';
|
animationEvent = 'animationend';
|
||||||
|
|
||||||
const el = optEl || document.createElement('ws');
|
const el = optEl || document.createElement('ws');
|
||||||
const animations = {
|
const animations = {
|
||||||
@@ -101,11 +101,12 @@ export default class DOM {
|
|||||||
const animationNames = Object.keys(animations);
|
const animationNames = Object.keys(animations);
|
||||||
|
|
||||||
for (let i = 0, length = animationNames.length;
|
for (let i = 0, length = animationNames.length;
|
||||||
i < length && !animationEvent; i++) {
|
i < length; i++) {
|
||||||
const animationName = animationNames[i];
|
const animationName = animationNames[i];
|
||||||
|
|
||||||
if (typeof el.style[animationName] !== 'undefined') {
|
if (typeof el.style[animationName] !== 'undefined') {
|
||||||
animationEvent = animations[animationName];
|
animationEvent = animations[animationName];
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user