choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
36 lines (27 loc) • 836 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = isStickySupport;
var _shared = require("choerodon-ui/shared");
function isStickySupport() {
var STICKY_SUPPORT = _shared.global.STICKY_SUPPORT;
if (STICKY_SUPPORT !== undefined) {
return STICKY_SUPPORT;
}
if (typeof window !== 'undefined') {
var vendorList = ['', '-webkit-', '-ms-', '-moz-', '-o-'];
var stickyElement = document.createElement('div');
var support = vendorList.some(function (vendor) {
stickyElement.style.position = "".concat(vendor, "sticky");
if (stickyElement.style.position !== '') {
return true;
}
return false;
});
_shared.global.STICKY_SUPPORT = support;
return support;
}
return true;
}
//# sourceMappingURL=isStickySupport.js.map
;