Skip to content

The open alternative to Salesforce, designed for AI.

341 B
Raw Blame
import { type NodeWithOwnerDocument } from '@/polyfills/dom/types/NodeWithOwnerDocument';
import { toGlobalScopeRecord } from '@/polyfills/utils/toGlobalScopeRecord';

export const resolveOwnerWindowOfNode = (
  node: NodeWithOwnerDocument,
): Record<string, unknown> =>
  toGlobalScopeRecord(node.ownerDocument?.defaultView ?? globalThis);