ElementRef type
Home > @rimitive/view > ElementRef
ElementRef type
Section titled “ElementRef type”Element ref node - wraps created elements for tree structure Forms doubly-linked list with prev/next pointers for efficient sibling traversal Links to parent for tree traversal Tracks child NodeRefs for tree walking (needed for SSR fragment detection)
Signature:
export type ElementRef<TElement> = BaseRef & { status: typeof STATUS_ELEMENT; element: TElement; parent: ElementRef<TElement> | null; prev: LinkedNode<TElement> | null; next: LinkedNode<TElement> | null; firstChild: LinkedNode<TElement> | null; lastChild: LinkedNode<TElement> | null;};References: BaseRef, STATUS_ELEMENT, ElementRef, LinkedNode