Skip to content

Commit

Permalink
feat: forward the subscribers abort signal in event listener
Browse files Browse the repository at this point in the history
  • Loading branch information
maraisr committed Dec 11, 2024
1 parent e1d9685 commit 6a737d2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1811,11 +1811,12 @@ partial interface EventTarget {
:: false

: [=event listener/signal=]
:: null
:: |subscriber|'s [=Subscriber/subscription controller=]'s [=AbortController/signal=]

Note: The {{AbortSignal}} for event listeners [=add an event listener|added=] by
{{EventTarget/when()}} is managed by the {{Observable}} itself. See
{{Observable/subscribe()}} and {{SubscribeOptions}}.
Note: To ensure that the [=event listener=] is cleaned up when
[=Subscriber/subscription controller=]'s [=AbortController/signal=] is [=AbortSignal/aborted=].
Preventing listener leaks regardless of whether {{Observable}} or {{EventTarget}} depending on
ownership model in engines.

1. Return |observable|.
</div>
Expand Down

0 comments on commit 6a737d2

Please sign in to comment.