v1.1.0: Revolutionary Multi-Handler System
๐๏ธ YpsilonEventHandler v1.1.0: Multi-Handler Revolution
๐ Major New Features
Multi-Handler System with Closest-Match Resolution
- Multiple handlers per event type - Different DOM areas can
have specialized handlers - Intelligent priority system - Closest handler to event
target wins automatically - DOM distance calculation - Precise handler selection based
on containment hierarchy - Zero configuration - Works automatically with existing
delegation patterns
Custom Event Dispatch System
- Native CustomEvent integration -
this.dispatch('myEvent', data) - Automatic bubbling - Events bubble through existing
delegation system - Type-safe handler routing - Custom events use same
handleEventTypepattern
Enhanced Developer Experience
- Handler validation - Warns about missing handler methods
during registration - Enhanced debugging - New breakdown of multi-handler mappings
in debug output - Resize handling - Automatic placeholder height recalculation
on window resize
โก Performance & Compatibility
- Browser support: IE11+ (2013), Chrome 38+, Firefox 13+,
Safari 7+ - Memory efficient: Dual Map/WeakMap tracking for automatic
cleanup - Zero overhead: Only calculates distances when multiple
handlers exist
๐ฏ Real-World Performance
The SPA demo showcases staggering performance:
- 2,887+ clicks handled flawlessly
- 2,627+ dynamic elements created without memory leaks
- 3,664+ events processed with only 6 event listeners
๐ Installation
npm install ypsilon-event-handler@1.1.0
๐ฎ https://eypsilon.github.io/YpsilonEventHandler/example/public/s
pa.html