(target?: EventTarget | null)
| 22 | }; |
| 23 | |
| 24 | export const getOwnerWindow = (target?: EventTarget | null): Window & typeof globalThis => { |
| 25 | let ownerDocument = getOwnerDocument(target); |
| 26 | |
| 27 | // @ts-expect-error Ensure safe access in SSR environments. |
| 28 | return ownerDocument?.defaultView ?? (typeof window !== 'undefined' ? window : undefined); |
| 29 | }; |
| 30 | |
| 31 | /** |
| 32 | * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType |
no test coverage detected