Adds a listener to the given target, and returns a promise that resolves with the first event emitted of the given type.
target
type
The target to add an event listener to.
The event type to listen for.
Options to pass to addEventListener.
addEventListener
A promise that resolves with the first event emitted of type.
Adds a listener to the given
target
, and returns a promise that resolves with the first event emitted of the giventype
.