Skip to main content

Interface: IMyopComponent<P, R>

Defined in: host/components/IMyopComponent.ts:55

Type Parameters​

• P = any

• R = any

Properties​

componentDefinition​

componentDefinition: IComponentDefinitionConfig

Defined in: host/components/IMyopComponent.ts:65


container​

container: HTMLElement

Defined in: host/components/IMyopComponent.ts:70


dispose()​

dispose: () => void

Defined in: host/components/IMyopComponent.ts:86

Returns​

void


element?​

optional element: HTMLElement

Defined in: host/components/IMyopComponent.ts:73


id​

id: string

Defined in: host/components/IMyopComponent.ts:57


initiated()​

initiated: () => Promise<any>

Defined in: host/components/IMyopComponent.ts:84

Returns​

Promise<any>


isInitiated​

isInitiated: boolean

Defined in: host/components/IMyopComponent.ts:59


markedForDisposed​

markedForDisposed: boolean

Defined in: host/components/IMyopComponent.ts:61


observeAutoSize()?​

optional observeAutoSize: (options?) => CleanupHandler

Defined in: host/components/IMyopComponent.ts:100

Observes the iframe content size and automatically syncs it to the iframe element. Only available for iframe-based components. Uses direct contentDocument access.

Parameters​

options?​

AutoSizeOptions

Configuration options including size change callback and min/max constraints

Returns​

CleanupHandler

Cleanup function to stop observing


onMessageReceived()​

onMessageReceived: (msg) => boolean

Defined in: host/components/IMyopComponent.ts:82

Parameters​

msg​

BaseMyopMessage

Returns​

boolean


parent?​

optional parent: IMyopComponent

Defined in: host/components/IMyopComponent.ts:109


props​

props: P

Defined in: host/components/IMyopComponent.ts:111


refs​

refs: R

Defined in: host/components/IMyopComponent.ts:113


send()​

send: (msg) => CleanupHandler

Defined in: host/components/IMyopComponent.ts:75

Parameters​

msg​

BaseMyopMessage

Returns​

CleanupHandler


setInitiated()​

setInitiated: () => void

Defined in: host/components/IMyopComponent.ts:63

Returns​

void


sizeMeta?​

optional sizeMeta: null | { height: string | number; maxHeight: number; maxWidth: number; minHeight: number; minWidth: number; width: string | number; }

Defined in: host/components/IMyopComponent.ts:107

Parsed myop:size meta tag from the component HTML. Set by HTMLComponentLoader before iframe creation. Used by the React host to determine sizing mode (fill vs content).


uiTags​

readonly uiTags: string[]

Defined in: host/components/IMyopComponent.ts:68

Runtime tags: only tags named ui:... (e.g. ui:beta). [] when there are none.

Methods​

bind()​

Call Signature​

bind(messageType, handler): void

Defined in: host/components/IMyopComponent.ts:77

Parameters​
messageType​

MyopMessageKey

handler​

() => boolean

Returns​

void

Call Signature​

bind<T>(messageType, handler): void

Defined in: host/components/IMyopComponent.ts:79

Type Parameters​

• T extends BaseMyopMessage

Parameters​
messageType​

MyopMessageKey

handler​

(message) => boolean

Returns​

void


hide()​

hide(): void

Defined in: host/components/IMyopComponent.ts:88

Returns​

void


inspect()​

inspect(): void

Defined in: host/components/IMyopComponent.ts:92

Returns​

void


show()​

show(): void

Defined in: host/components/IMyopComponent.ts:90

Returns​

void