Writes the propagation path of target into out โ root first, target
last โ and returns it.
That is the order the capture phase walks; the bubble phase walks it
backwards. The path is captured before dispatch, so a listener that
reparents or removes a node mid-dispatch cannot change where the rest of the
event goes (the same "snapshot first, then deliver" rule ยง6b applies to
listener lists).
Pass out to reuse an array โ the walk overwrites it and truncates it to the
path length, allocating nothing.
Writes the propagation path of
targetintooutโ root first, target last โ and returns it.That is the order the capture phase walks; the bubble phase walks it backwards. The path is captured before dispatch, so a listener that reparents or removes a node mid-dispatch cannot change where the rest of the event goes (the same "snapshot first, then deliver" rule ยง6b applies to listener lists).
Pass
outto reuse an array โ the walk overwrites it and truncates it to the path length, allocating nothing.