Function getDirectChildren

  • Gets an element's direct children. Includes slotted elements, direct <slot> children themselves, and all direct children of a shadow DOM. Default <slot> children are not included (since they're not "direct" children as they are nested under <slot>).

    Note that that slotted elements and light dom elements will always be shown above shadow dom elements. Besides that, the order of children is preserved.

    Parameters

    • startingElement: Readonly<Element>

    Returns Element[]