Add supportsFlex() function and error handling for unsupported flex layout

This commit is contained in:
Harvey Zack committed 2024-03-30 11:02:35 +08:00
1 parent fb6179e2be
commit d982f4d3b1
4 files changed
+18 -3

No files matched your search

+6
View File
@@ -107,3 +107,9 @@ export function setStyleText(id, style) {
document.head.appendChild($style);
}
}
export function supportsFlex() {
const div = document.createElement('div');
div.style.display = 'flex';
return div.style.display === 'flex';
}