Skip to content

API / wxt/utils/content-script-ui/shadow-root / ShadowRootContentScriptUi

Interface: ShadowRootContentScriptUi<TMounted> ​

Source: packages/wxt/src/utils/content-script-ui/shadow-root.ts:138

Contents ​

Extends ​

Type Parameters ​

TMounted ​

TMounted

Properties ​

autoMount ​

autoMount: (options?) => void

Source: packages/wxt/src/utils/content-script-ui/types.ts:138

Call ui.autoMount() to automatically mount and remove the UI as the anchor is dynamically added/removed by the webpage.

Parameters ​

options? ​

AutoMountOptions

Returns ​

void

Inherited from ​

ContentScriptUi.autoMount


mount ​

mount: () => void

Source: packages/wxt/src/utils/content-script-ui/types.ts:127

Function that mounts or remounts the UI on the page.

Returns ​

void

Inherited from ​

ContentScriptUi.mount


mounted ​

mounted: TMounted | undefined

Source: packages/wxt/src/utils/content-script-ui/types.ts:4

Inherited from ​

ContentScriptUi.mounted


remove ​

remove: () => void

Source: packages/wxt/src/utils/content-script-ui/types.ts:130

Function that removes the UI from the webpage.

Returns ​

void

Inherited from ​

ContentScriptUi.remove


shadow ​

shadow: ShadowRoot

Source: packages/wxt/src/utils/content-script-ui/shadow-root.ts:153

The shadow root performing the isolation.


shadowHost ​

shadowHost: HTMLElement

Source: packages/wxt/src/utils/content-script-ui/shadow-root.ts:146

The HTMLElement hosting the shadow root used to isolate the UI's styles. This is the element that get's added to the DOM. This element's style is not isolated from the webpage.


uiContainer ​

uiContainer: HTMLElement

Source: packages/wxt/src/utils/content-script-ui/shadow-root.ts:151

The container element inside the ShadowRoot whose styles are isolated. The UI is mounted inside this HTMLElement.


Generated using typedoc-plugin-markdown and TypeDoc