json-dom
    Preparing search index...

    Function getParentsFromAttribute

    • A selector function for retrieving existing child domGeneral.DomItems from the given parent item. This function will check all the children starting from item, and scan the attributes property for matches. The return array contains children matching from all levels. WARNING: This is a recursive function.

      Parameters

      • attr: string

        Provide the attribute name to be searched

      • value: unknown

        The attribute value to be compared

      • item: DomItem = documentItem.body

        The DomItem which may have parent items matching the attribute criteria

      Returns DomItem[]