DomEventStream

com.raquo.airstream.web.DomEventStream$

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

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 parameters

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 parameters

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

Attributes