Skip to content

events: only add listener if AbortSignal not aborted

If the AbortSignal is already aborted, then there's no sense in registering the handler. The spec even says not to do so to retain "abort algorithms" if the aborted flag is set.

Signed-off-by: James M Snell jasnell@gmail.com

/cc @benjamingr

Merge request reports

Loading