@storybook/channel-postmessage
- Version 7.0.18
- Published
- 13.5 kB
- 6 dependencies
- MIT license
Install
npm i @storybook/channel-postmessage
yarn add @storybook/channel-postmessage
pnpm add @storybook/channel-postmessage
Overview
Storybook PostMessage Channel is a channel for Storybook that can be used when the Storybook Renderer runs inside an iframe or a child window. A channel can be created using the `createChannel` function.
Index
Variables
variable KEY
const KEY: string;
Functions
function createChannel
createChannel: ({ page }: Config) => Channel;
Creates a channel which communicates with an iframe or child window.
Classes
class PostmsgTransport
class PostmsgTransport {}
constructor
constructor(config: Config);
method send
send: (event: ChannelEvent, options?: any) => Promise<any>;
Sends
event
to the associated window. If the window does not yet exist the event will be stored in a buffer and sent when the window exists.Parameter event
method setHandler
setHandler: (handler: ChannelHandler) => void;
Package Files (1)
Dependencies (6)
Dev Dependencies (1)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@storybook/channel-postmessage
.
- Markdown[](https://www.jsdocs.io/package/@storybook/channel-postmessage)
- HTML<a href="https://www.jsdocs.io/package/@storybook/channel-postmessage"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3768 ms. - Missing or incorrect documentation? Open an issue for this package.