Skip to content

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

Type alias: IframeContentScriptUiOptions<TMounted>

IframeContentScriptUiOptions<TMounted>: ContentScriptUiOptions<TMounted> & object

Type declaration

onBeforeMount

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

onMount

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

page

page: HtmlPublicPath

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

Type parameters

Parameter
TMounted

Source

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


Generated using typedoc-plugin-markdown and TypeDoc