Skip to main content
100%

Gist c4276ed96ff4bd575933c7ad390a7a92

✓ Published0🌍 Public
HHypercubed
Last edited May 27, 2016
Created on May 27, 2016

This example demonstrates a custom event-dispatch loop using the D3 dispatch module. It creates a `dispatch` object with a `foo` event, registers a handler, and then triggers that event 3,000 times via `dispatch.call`. The handler checks whether the passed argument is `undefined` and prints a message if so. The page displays the total number of times the handler was called. The code relies on `d3_dispatch.dispatch` and the `on`/`call` methods to manage custom event flow, with no external data source.

AI-generated description

Similar vizzes