The name of the trigger event the listener was registered under.
The listener function to match against.
The custom args the listener was registered with.
The options the listener was registered with; only the capture flag is compared.
The DomItem whose eventListeners will be searched.
A 2-element [index, matchingListener] tuple. If no match is found, index is -1 and matchingListener is undefined.
Search a DOM item's eventListeners for a specific event listener, matched by listener function, custom args, and whether it listens in the capture phase. Returns its index and the matching descriptor as a tuple.
As with the DOM's removeEventListener, only the capture flag tells two listeners of the same function apart: once, passive and signal only change how a listener behaves, not which listener it is.
item is the last parameter (instead of customArgs/options having literal defaults) so this can be curried and piped directly - see fullAddEventListener for an example of the pattern.