@aimake/nanod
Version:
## 设计模式 NANO DESIGN 是面向于企业级中台化应用的解决方案。服务于 ToB 和 ToE 类型的单页应用,应用于各产品中从而产出了一套设计及前端规范。
28 lines (27 loc) • 790 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
var animation = void 0;
function isCssAnimationSupported() {
if (animation !== undefined) {
return animation;
}
var domPrefixes = 'Webkit Moz O ms Khtml'.split(' ');
var elm = document.createElement('div');
if (elm.style.animationName !== undefined) {
animation = true;
}
if (animation !== undefined) {
for (var i = 0; i < domPrefixes.length; i++) {
if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {
animation = true;
break;
}
}
}
animation = animation || false;
return animation;
}
exports['default'] = isCssAnimationSupported;
module.exports = exports['default'];