There are two categories of events, delegated and per-node events.
For delegated events, we attach a single event listener to the application's mount point.
So, say we have a delegated event
onclick. If you create 50 DOM nodes with
onclick handler will be in the DOM.
This event listener handles all events and handles bubbling and
For per-node events we attach the event to the DOM node.
onfoo is a per-node event. If you create 50 DOM nodes with 50
there will be 50
onfoo callbacks in the DOM (one per node).