Latest updates from IceHrmPro
This commit is contained in:
28
web/node_modules/rc-util/es/Dom/support.js
generated
vendored
Normal file
28
web/node_modules/rc-util/es/Dom/support.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import canUseDOM from './canUseDom';
|
||||
var animationEndEventNames = {
|
||||
WebkitAnimation: 'webkitAnimationEnd',
|
||||
OAnimation: 'oAnimationEnd',
|
||||
animation: 'animationend'
|
||||
};
|
||||
var transitionEventNames = {
|
||||
WebkitTransition: 'webkitTransitionEnd',
|
||||
OTransition: 'oTransitionEnd',
|
||||
transition: 'transitionend'
|
||||
};
|
||||
|
||||
function supportEnd(names) {
|
||||
var el = document.createElement('div');
|
||||
|
||||
for (var name in names) {
|
||||
if (names.hasOwnProperty(name) && el.style[name] !== undefined) {
|
||||
return {
|
||||
end: names[name]
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
export var animation = canUseDOM() && supportEnd(animationEndEventNames);
|
||||
export var transition = canUseDOM() && supportEnd(transitionEventNames);
|
||||
Reference in New Issue
Block a user