You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: merge getShadowRoots into getEventTargets, single addEvent per caller
Collapse the per-caller two-addEvent-calls pattern to one. getShadowRoots
is replaced by getEventTargets(global, refNode), which returns
[global, ...shadowRoots] as a single EventTarget[] (addEvent already
accepts arrays and returns one combined cleanup).
getEventTargets only collects the shadow roots that lie strictly between
refNode and global, stopping at global's own root node so it works
correctly even when a non-window/document node is passed as global.
addEvent's body stays byte-for-byte identical to #10102; only its JSDoc
gains a note about composed:false events (scroll, scrollend) and when to
use getEventTargets, so the implementation still auto-merges with #10102.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments