Object

Properties

Object

O.ViewEventsController

Most DOM events are handled via delegation. When an event occurs, it is
passed to the O.ViewEventsController. This maintains a list of event
targets that should receive the event before the view handles it, and a list
of targets that should receive it after it has traversed the view hierarchy.

When an event is dispatched, it passes through all targets in the first
list, then is dispatched at the view which owns the node on which the event
occurred (and will bubble up the view tree from there), then passes through
all the targets that are queued to handle it after the view. Any event
handler may call event.stopPropagation(), which will stop the view from
passing to any further targets.

Method

O.ViewEventsController.handleEvent( event, view )

Dispatches an event to each of the targets registered with the
controller, until it reaches the end of the list or one of them calls
event.stopPropagation().

Parameters

event

Event The event object to dispatch.

view

O.ViewOptional The view at which the event originated.
This is the view the event will be fired upon after it has
been through all the pushed targets. If not supplied, the
view will be looked up via the DOM node in the
`event.target` property.