Statement
Cross-component communication shall use named custom DOM events dispatched on the window object (e.g., theme-changed, search:open, listbox-change) rather than direct component coupling. Event names and payload shapes shall be treated as public API contracts.
Rationale
Custom events enable loose coupling between vanilla JS components that need to coordinate. Treating them as API contracts prevents silent breakage.
Topics
Owner: component-system
Applies To
- Vanilla JS Interactivity Patterns DOC-00110
- Component Authoring DOC-00040