wdpr
    Preparing search index...
    • Type guard that checks whether an EventTarget is a DOM Element.

      Uses nodeType === 1 (ELEMENT_NODE) rather than instanceof Element so that it works correctly across different realms (e.g. iframes) and in testing environments like happy-dom where the Element constructor may differ from the one in the main window.

      Parameters

      • target: EventTarget | null

        The event target to check, typically from event.target.

      Returns target is Element

      true if the target is a DOM Element.