πŸš€ YpsilonEventHandler SPA Demo

Demonstrating the power of event delegation with dynamic content

⚑ ONLY 5 9 EVENT LISTENERS for this ENTIRE SPA! ⚑

ONE handler on body handles ALL events - no matter when elements are created!

πŸ“Š Live Statistics

0
Total Clicks
0
Dynamic Elements
0
Todo Items
0
Events Handled
0
Scroll Position

🎯 Dynamic Content Creator

Create new elements dynamically - they work instantly without new listeners!

βœ… Todo List Manager

Add, complete, and delete todos - all handled by the same body listener!

πŸ“‘ Dynamic Tab System

Switch between tabs - all handled by event delegation!

Tab 1 Content

This is the content of tab 1. Click buttons below to test event delegation:

Tab 2 Content

This is the content of tab 2. These buttons were here from the start:

Tab 3 Content

This is the content of tab 3. Event delegation works everywhere:

πŸ“ Form Interactions

All form events handled by the same body listener with delegation:

Scroll Test (Passive Listeners)

Scroll in the area below to test passive scroll events:

Scrollable Content

This scroll area demonstrates passive event listeners.

When you scroll here, the event will be handled with passive:true automatically.

This improves performance by telling the browser that preventDefault() won't be called.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore.

Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia.

Keep scrolling to see more content...

The scroll events are being logged to the output area above.

Notice how smooth the scrolling is with passive listeners!

This is the power of automatic passive listener detection.

YpsilonEventHandler handles this optimization automatically.

No manual configuration needed!

You're near the bottom now.

Final paragraph of scrollable content.

πŸ“‘ Assigned Event Listeners

These are the event listeners assigned to this entire SPA!

No additional listeners will be created - all dynamic content uses these same 5 9 listeners via event delegation.


πŸ† Staggeringly Performant

Just click or focus on any button that generates something visual, like "βž• Create Card" and keep enter pressed! While you generate, scroll using the scrollbar. It allows us to scroll fast. Try it for yourself, it took me seconds.

Clicks: 2,887 Dynamic Elements: 2,627 Events Handled: 3,664 Scroll Position: 143k Event Listeners: 6

All achieved with ~500 lines of vanilla JavaScript + native handleEvent interface. One has to see it to believe it.

πŸ“‹ Event Log

Watch how ONE body listener handles ALL events (max: 50):

Event log will appear here...
ACTIVE
Action completed!
Β© Engin Ypsilon & Claude Van DOM | github | npm | reload