Imagine you have a bunch of components and subcomponents in your web application. You want to keep track of how all the custom events you added behave. Are there established ways to diagram or document these behaviors?
Here are some things the documentation should show:
- The actual nesting of relevant DOM elements of the various components.
- The names of events and where they're fired from.
- Any payloads that are attached to the custom events (e.g. the contents of
memo
in a Prototype custom event.) - The places where events are observed.
- Indications of what events are fired in response to other events.
- Where events are allowed to bubble, and where they are stopped.