{"version":"1.0","type":"rich","title":"Do we really need an event emitter?","description":"This example shows how to replace event-emitter libraries like WildEmitter with native browser APIs. It defines a Vocab model that dispatches a custom `addToVocab` event via `dispatchEvent(new CustomEvent(...))` on the global `window` object, and a VocabView that listens with `addEventListener`. The code demonstrates that `addEventListener` and `dispatchEvent` work globally without needing an emitter instance, using only vanilla JavaScript and DOM events.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-2c52b5f914167eb68fa5?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}