void onData(T event)
) Adds a capturing subscription to this stream.
If the target of the event is a descendant of the element from which this
stream derives then onData
is called before the event propagates down to
the target. This is the opposite of bubbling behavior, where the event
is first processed for the event target and then bubbles upward.
Other resources
-
Event Capture from the W3C DOM Events specification.
Source
/**
* Adds a capturing subscription to this stream.
*
* If the target of the event is a descendant of the element from which this
* stream derives then [onData] is called before the event propagates down to
* the target. This is the opposite of bubbling behavior, where the event
* is first processed for the event target and then bubbles upward.
*
* ## Other resources
*
* * [Event Capture]
* (http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-capture)
* from the W3C DOM Events specification.
*/
StreamSubscription<T> capture(void onData(T event));