UNPKG

jcore-ui

Version:

jcore-ui - components for building an interface

42 lines (35 loc) 1.08 kB
const event = { transitionEnd(){ var t, el = document.createElement("fakeelement"); var transitions: any = { "transition" : "transitionend", "OTransition" : "oTransitionEnd", "MozTransition" : "transitionend", "WebkitTransition": "webkitTransitionEnd" } for (t in transitions){ const idx: any = t; if (el.style[idx] !== undefined){ return transitions[idx]; } } }, animationEnd(){ var t, el = document.createElement("fakeelement"); var animations: any = { "animation" : "animationend", "OAnimation" : "oAnimationEnd", "MozAnimation" : "animationend", "WebkitAnimation": "webkitAnimationEnd" } for (t in animations){ const idx: any = t; if (el.style[idx] !== undefined){ return animations[idx]; } } } } export default event