ant-design-vue/components/_util/isFlexSupported.js

13 lines
397 B
JavaScript
Raw Normal View History

2019-01-12 03:33:27 +00:00
export default function isFlexSupported() {
2017-11-02 02:42:34 +00:00
if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
2019-01-12 03:33:27 +00:00
const { documentElement } = window.document;
return (
'flex' in documentElement.style ||
2017-11-02 02:42:34 +00:00
'webkitFlex' in documentElement.style ||
'Flex' in documentElement.style ||
'msFlex' in documentElement.style
2019-01-12 03:33:27 +00:00
);
2017-11-02 02:42:34 +00:00
}
2019-01-12 03:33:27 +00:00
return false;
2017-11-02 02:42:34 +00:00
}