Skip to content

API / wxt/utils/content-script-ui/iframe / IframeContentScriptUiOptions

Type Alias: IframeContentScriptUiOptions<TMounted>

IframeContentScriptUiOptions<TMounted> = ContentScriptUiOptions<TMounted> & object

Source: packages/wxt/src/utils/content-script-ui/iframe.ts:60

Type Declaration

onBeforeMount?

optional onBeforeMount?: (wrapper, iframe) => void

Callback executed before mounting the UI. Use this function to customize the iframe or wrapper elements before they are injected into the DOM. It is called every time ui.mount() is called.

Parameters

wrapper

HTMLElement

iframe

HTMLIFrameElement

Returns

void

onMount?

optional onMount?: (wrapper, iframe) => TMounted

Callback executed when mounting the UI. Use this function to customize the iframe or wrapper element's appearance. It is called every time ui.mount() is called.

Optionally return a value that can be accessed at ui.mounted or in the onRemove callback.

Parameters

wrapper

HTMLElement

iframe

HTMLIFrameElement

Returns

TMounted

page

page: any

The path to the HTML page that will be shown in the iframe. This string is passed into browser.runtime.getURL.

Type Parameters

TMounted

TMounted


Generated using typedoc-plugin-markdown and TypeDoc