LWT JavaScript API
    Preparing search index...
    • Check if an element or its ancestors have a specific class.

      Parameters

      • element: HTMLElement

        Element to check

      • className: string

        Class name to look for

      Returns boolean

      True if element or any ancestor has the class