Skip to content

v1.1.0: Revolutionary Multi-Handler System

Choose a tag to compare

@eypsilon eypsilon released this 13 Jul 04:27
· 75 commits to main since this release

๐ŸŽ–๏ธ 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
    handleEventType pattern

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