Skip to main content

Class: IframeSDK

Defined in: Iframe/IframeSDK.ts:62

The Iframe SDK is intended for scenarios where developers wish to implement Myop components as separate web applications hosted within iframes.

By importing the Iframe SDK, developers gain access to tools and utilities necessary for handling communication between the host application and the embedded iframe-based Myop components

This SDK facilitates secure isolation, allowing components to function independently while still benefiting from the overall structure and management capabilities provided by the host application.

Once loaded the RootSDK, you can load the IframeSDK

const {IframeSDK} = (await window.myop.rootSDK.getIframeModule());

or

import {getIframeModule} from '@myop/sdk';
const {IframeSDK} = (await getIframeModule());

Extends​

Constructors​

new IframeSDK()​

new IframeSDK(): IframeSDK

Defined in: Iframe/IframeSDK.ts:66

Returns​

IframeSDK

Overrides​

BaseMyopSDK.constructor

Properties​

alwaysPassEnvelopesToHost​

alwaysPassEnvelopesToHost: boolean = false

Defined in: common/BaseMyopSDK.ts:53

Inherited from​

BaseMyopSDK.alwaysPassEnvelopesToHost


components​

components: Record<string, HostedComponent> = {}

Defined in: common/BaseMyopSDK.ts:51

Inherited from​

BaseMyopSDK.components


messageCleanupCache​

messageCleanupCache: Record<string, CleanupHandler | Promise<CleanupHandler>> | Promise<void> = {}

Defined in: common/BaseMyopSDK.ts:55

Inherited from​

BaseMyopSDK.messageCleanupCache


messageToHandleAfterInit​

messageToHandleAfterInit: BaseMyopMessage[] = []

Defined in: common/BaseMyopSDK.ts:49

Inherited from​

BaseMyopSDK.messageToHandleAfterInit


supportedHandlers​

supportedHandlers: BaseMessageHandler[]

Defined in: Iframe/IframeSDK.ts:105

Overrides​

BaseMyopSDK.supportedHandlers


version​

version: any

Defined in: Iframe/IframeSDK.ts:64

Methods​

handleIncomeMessages()​

handleIncomeMessages(event): void

Defined in: common/BaseMyopSDK.ts:57

Parameters​

event​

any

Returns​

void

Inherited from​

BaseMyopSDK.handleIncomeMessages


init()​

init(): void

Defined in: Iframe/IframeSDK.ts:168

Returns​

void

Overrides​

BaseMyopSDK.init


messageToHost()​

messageToHost(message, replayTo?): void

Defined in: Iframe/IframeSDK.ts:77

Parameters​

message​

MyopBindReplayMessage

replayTo?​

MyopBindMessage

Returns​

void

Overrides​

BaseMyopSDK.messageToHost