This commit is contained in:
2023-04-20 12:42:20 +03:00
parent 45bbc09077
commit 20eb79d955
5 changed files with 201 additions and 4 deletions
+39 -1
View File
@@ -441,6 +441,42 @@ __PluginManager__.register('support', function(module, exports, require, global)
node.getAttribute('')
}
/**
* @description Событие окончания CSS transition
*/
function whichTransitionEvent() {
var el = document.createElement("fakeelement");
var transitions = {
"transition": "transitionend",
"OTransition": "oTransitionEnd",
"MozTransition": "transitionend",
"WebkitTransition": "webkitTransitionEnd"
};
for (var t in transitions) {
if (el.style[t] !== undefined) {
return transitions[t];
}
}
};
/**
* @description Событие окончания CSS animation
*/
function whichAnimationEvent() {
var el = document.createElement("fakeelement2");
var animations = {
"animation": "animationend",
"OAnimation": "oAnimationEnd",
"MozAnimation": "animationend",
"WebkitAnimation": "webkitAnimationEnd"
};
for (var t in animations) {
if (el.style[t] !== undefined) {
return animations[t];
}
}
};
/**
* @memberOf kit
*/
@@ -478,7 +514,9 @@ __PluginManager__.register('support', function(module, exports, require, global)
tagName: setTagName,
data,
setObjProp,
getObjProp
getObjProp,
whichAnimationEvent,
whichTransitionEvent
};
return module.exports = support;