Sets up a delegation listener for an event occurring inside the Node.The delegated event will be verified against a supplied selector or filtering function to test if the event references at least one node that should trigger the subscription callback.
Selector string filters will trigger the callback if the event originated from a node that matches it or is contained in a node that matches it. Function filters are called for each Node up the parent axis to the subscribing container node, and receive at each level the Node and the event object. The function should return true (or a truthy value) if that Node should trigger the subscription callback. Note, it is possible for filters to match multiple Nodes for a single event. In this case, the delegate callback will be executed for each matching Node.
For each matching Node, the callback will be executed with its 'this' object set to the Node matched by the filter (unless a specific context was provided during subscription), and the provided event's currentTarget
will also be set to the matching Node. The containing Node from which the subscription was originally made can be referenced as e.container
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|