Skip to main content

Class: IframeSDK

Defined in: Iframe/IframeSDK.ts:61

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:65

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: Promise<void> | Record<string, CleanupHandler | Promise<CleanupHandler>> = {}

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:100

Overrides

BaseMyopSDK.supportedHandlers


version

version: any

Defined in: Iframe/IframeSDK.ts:63

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:117

Returns

void

Overrides

BaseMyopSDK.init


messageToHost()

messageToHost(message, replayTo?): void

Defined in: Iframe/IframeSDK.ts:76

Parameters

message

MyopBindReplayMessage

replayTo?

MyopBindMessage

Returns

void

Overrides

BaseMyopSDK.messageToHost