• Checks if the target is visible in the browser viewport.

    Parameters

    • target: null | Target

      Element, EventTarget, or CSS selector.

    Returns boolean

    true if the target is in the viewport.

    InvalidElementError if the specified target wasn't found.