Skip to content

Add EventListenerOptions#signal #686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api-reports/2_12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1822,6 +1822,7 @@ EventInit[JT] var scoped: js.UndefOr[Boolean]
EventListenerOptions[JT] var capture: js.UndefOr[Boolean]
EventListenerOptions[JT] var once: js.UndefOr[Boolean]
EventListenerOptions[JT] var passive: js.UndefOr[Boolean]
EventListenerOptions[JT] var signal: js.UndefOr[AbortSignal]
EventSource[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
EventSource[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit
EventSource[JC] def close(): Unit
Expand Down
1 change: 1 addition & 0 deletions api-reports/2_13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1822,6 +1822,7 @@ EventInit[JT] var scoped: js.UndefOr[Boolean]
EventListenerOptions[JT] var capture: js.UndefOr[Boolean]
EventListenerOptions[JT] var once: js.UndefOr[Boolean]
EventListenerOptions[JT] var passive: js.UndefOr[Boolean]
EventListenerOptions[JT] var signal: js.UndefOr[AbortSignal]
EventSource[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
EventSource[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit
EventSource[JC] def close(): Unit
Expand Down
5 changes: 5 additions & 0 deletions dom/src/main/scala/org/scalajs/dom/EventListenerOptions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ trait EventListenerOptions extends js.Object {
* See Improving scrolling performance with passive listeners to learn more.
*/
var passive: js.UndefOr[Boolean] = js.undefined

/** An AbortSignal. The listener will be removed when the given AbortSignal object's abort() method is called. If not
* specified, no AbortSignal is associated with the listener.
*/
var signal: js.UndefOr[AbortSignal] = js.undefined
}