Map of event target matcher to associated handler function
Optional
wrapListeners: booleanWhether to werap the matcher functions with eventListener
.
table.onclick = matchListener({
'a.lbl': e => select(e.target.parentNode.parentNode),
'span.remove': [removeListener, preventDefault, stopPropagation]
}, true);
Takes advantage of event bubbling to listen for events on descendant elements to reduce the number of listeners to create.