Most efficient way to dynamically bind event handlers
问题 Problem: I need to bind any number of event handlers to any number of elements (DOM nodes, window , document ) at dynamically runtime and I need to be able to update event binding for dynamically created (or destroyed) nodes during the lifetime of my page. There are three options that I can see for tackling this problem: I) Event delegation on window II) Direct event binding on each node III) Event delegation on common ancestors (which would be unknown until runtime and would potentially need