neue Homepage auf react basis

This commit is contained in:
2026-08-07 21:39:30 +02:00
parent 164bdd19ad
commit ee89442c04
52191 changed files with 1230242 additions and 58 deletions
+21
View File
@@ -0,0 +1,21 @@
import ownerWindow from '@mui/utils/ownerWindow';
/**
* Checks if a value is an HTMLElement, including elements from other iframes/realms.
*/
export function isHTMLElement(value) {
if (typeof window === 'undefined' || value == null) {
return false;
}
if (value instanceof HTMLElement) {
return true;
}
// Cross-realm: must be an element node (nodeType 1) from another window.
// The try/catch guards against detached/destroyed windows where accessing
// `.HTMLElement` on the owner window may throw.
try {
return value.nodeType === 1 && value instanceof ownerWindow(value).HTMLElement;
} catch {
return false;
}
}