mottai-iframe-bridge
TypeScript icon, indicating that this package has built-in type declarations

1.0.42 • Public • Published

// The API object is available as a global variable of your page.. window._fitiframe_api: IFrame;

//Here are the available methods of the API. interface IFrame {

// By default, at init, we are communicating the size of a content div using the selector '.container-size' // You can change this selector to adapt to your content setSizeSelector(selector: string);

// If overriding the selector is not enough, you can provide your own callback to compute the size setSizeCallback(callback: () => { width: number, height: number });

// If the size change interactively, you can proactively send the new size to the Parent. sendSize(size: { width: number, height: number });

// Send a command to the Parent Window sendCommand(command: any); }

Package Sidebar

Install

npm i mottai-iframe-bridge

Weekly Downloads

1

Version

1.0.42

License

MIT

Unpacked Size

42.9 kB

Total Files

48

Last publish

Collaborators

  • brentamil