Dispatch a synthetic event
dispatch_eventFire a synthetic event at a Storybook story's rendered element to verify it responds as documented without a real UI trigger; the dispatch is also captured for inspection.
Instructions
The reverse direction: fire a synthetic event at the story's rendered custom element (found automatically, not necessarily the canvas's first child), to check it responds the way its docs claim — without a real UI trigger to click. The dispatch itself is also captured, same as anything else, so it shows up in the next get_events call too.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Event name, e.g. 'item-command'. | |
| detail | No | JSON detail payload for the event, if any. | |
| bubbles | No | ||
| composed | No |