Documentation
    Preparing search index...

    Function findParentNode

    • 向上递归查找父级元素,直到满足参数2的选择器条件的父元素

      • 没有符合条件的父元素时,返回 null

      Parameters

      • node: HTMLElement

        需要查找的起点元素

      • selector: string

        终点元素选择器

      • OptionalstopNode: string | HTMLElement

        停止查找的元素, 用于在已知范围内查找时优化性能

      Returns null | HTMLElement