The Main Event: Beyond Event Listeners in JavaScript
summary
Compares DOM bubbling versus addEventListener capture vs bubble and argues for treating events as a message bus instead of object-bound handlers, demonstrating Raphael’s Eve event bus wired into a “black screen of awesome” demo. Shows closures to wrap handlers, uses Eve’s wildcard handlers and event-namespacing, builds additive plugins (motion, comms, colorme), and relays Eve events over WebSockets so UI events become networked messages without changing core code.
AI-written summary · about
chapters (5)
- 0:00Start
- 1:42Two Modes to Capturing Events
- 6:18Message Buses
- 8:07The Black Screen of Awesome
- 17:16Embrace Your Freedom
related talks
20mThe Magic of Custom Event Emitters
21mEvent is the new Model
14mEvents As A Communication Pattern
52mEventSource: The under appreciated sibling of WebSockets
38mEvery Event, Everywhere, All at Once
28mDeep Dive on Ember Events
42mBeyond Promises: Async Patterns in JavaScript
41mThe Eventloop in JavaScript - How does it work?
