mottai-iframe-bridge
v1.0.42
Published
// The API object is available as a global variable of your page.. window._fitiframe_api: IFrame;
Downloads
49
Readme
// 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); }