DomEventStream

class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[Ev <: Event](eventTarget: EventTarget, eventKey: String, useCapture: Boolean): EventStream[Ev]

This stream, when started, registers an event listener on a specific target like a DOM element, document, or window, and re-emits all events sent to the listener.

This stream, when started, registers an event listener on a specific target like a DOM element, document, or window, and re-emits all events sent to the listener.

When this stream is stopped, the listener is removed.

Type Params
Ev
  • You need to specify what event type you're expecting. The event type depends on the event, i.e. eventKey. Look it up on MDN.
Value Params
eventKey

DOM event name, e.g. "click", "input", "change"

eventTarget

any DOM event target, e.g. element, document, or window

useCapture

See section about "useCapture" in https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener