An event bus is a design pattern (and while we’ll be talking about JavaScript here, it’s a design pattern in any language) that can be used to simplify communications between different components. It can also be thought of as publish/subscribe or pubsub. The idea is that components can listen to the event bus to know when to do the things they do. For example, a “tab panel” component might listen for events telling it to change the active tab. … Read article “Let’s Create a Lightweight Native Event Bus in JavaScript”
The post Let’s Create a Lightweight Native Event Bus in JavaScript appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.
https://css-tricks.com/lets-create-a-lightweight-native-event-bus-in-javascript/
Autentifică-te pentru a adăuga comentarii
Alte posturi din acest grup


Let’s run through a quick refresher. Image maps date all the way back to HTML 3.2, where, first, server-side maps and then client-side maps defined clickable regions over an image using map and are

Brad Frost is running this new little podcast called Open Up. Folks write in with questions about the “other” side


In this post, Blackle Mori shows you a few of the hacks found while trying to push the limits of Cohost’s HTML support. Use these if you dare, lest you too get labelled a CSS criminal.
<

