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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user