Skip to content

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

Interface: ShadowRootContentScriptUi<TMounted> ​

Contents ​

Extends ​

Type parameters ​

▪ TMounted

Properties ​

autoMount ​

autoMount: (options?) => void

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

Parameters ​

▪ options?: AutoMountOptions

Inherited from ​

ContentScriptUi.autoMount

Source ​

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


mount ​

mount: () => void

Function that mounts or remounts the UI on the page.

Inherited from ​

ContentScriptUi.mount

Source ​

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


mounted ​

mounted: undefined | TMounted

Inherited from ​

ContentScriptUi.mounted

Source ​

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


remove ​

remove: () => void

Function that removes the UI from the webpage.

Inherited from ​

ContentScriptUi.remove

Source ​

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


shadow ​

shadow: ShadowRoot

The shadow root performing the isolation.

Source ​

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


shadowHost ​

shadowHost: HTMLElement

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.

Source ​

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


uiContainer ​

uiContainer: HTMLElement

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

Source ​

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


Generated using typedoc-plugin-markdown and TypeDoc