Skip to content

API > wxt/client > IframeContentScriptUiOptions

Type alias: IframeContentScriptUiOptions<TMounted>

IframeContentScriptUiOptions<TMounted>: ContentScriptUiOptions<TMounted> & object

Type declaration

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

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/client/content-scripts/ui/types.ts:80


Generated using typedoc-plugin-markdown and TypeDoc