Same as fromEvent, however only supports well-known DOM event names. Returned stream instance will use corresponding concrete event type in its type signature, whereas fromEvent will only use the generic Event.
Creates a Stream of events attached to given element / event target and using given event listener options (same as supported by addEventListener(), default: false).
Parameters
src: EventTarget
event target
name: string
event name
Default value listenerOpts: boolean | AddEventListenerOptions = false
Same as fromEvent, however only supports well-known DOM event names. Returned stream instance will use corresponding concrete event type in its type signature, whereas fromEvent will only use the generic
Event
.fromDOMEvent(document.body, "mousemove"); // Stream<MouseEvent> fromEvent(document.body, "mousemove"); // Stream<Event>
Also see: fromEvent