tye
Micro Event Delegation Module
Usage
// Using browserifyvar tye = ;// or using the bundled file in dist bundled in UMD format<script src="/path/to/dist/bundle.min.js"></script> // Bind click event to document.body;// Event Delegation:; // Remove click binding from '.my-class';// Remove all click bindings from document.body;
Under the Hood
This is a wrapper around addEventListener
That allows for event delegation by using element.matches
Thats it, very simple implementation. 2kb minified