treeloom
    Preparing search index...

    Type Alias ForwardedEvent

    What a forwarded event is packaged as in render-only mode. See retrieveListener, makeForwardingListener.

    type ForwardedEvent = {
        data: unknown[];
        eventType: EventName;
        itemId: number;
        listenerFunc: string;
        targetState?: { checked?: boolean; value?: string };
    }
    Index
    data: unknown[]

    The custom args the listener was registered with.

    eventType: EventName

    The type of event which fired (event.type).

    itemId: number

    The id of the item the event fired on (domItemTarget, falling back to the item the listener is attached to when no domItemTarget was found) - read directly off that item's own id, not computed. Resolution is a lookup (getItemById) rather than a tree walk, so it still finds the right item even if the receiving end's own tree does not match the sending end's shape exactly (see getItemById vs the position-based getItemPath/getItemByPath this replaced).

    listenerFunc: string

    The registered name of the listener which would have run locally.

    targetState?: { checked?: boolean; value?: string }

    Live state read directly off the real event's target when present - a listener which reads e.g. (event.target as HTMLInputElement).checked needs this replayed onto the real target on the receiving end (see receiveForwardedEvent), since the two ends' elements are otherwise independent objects.