Skip to content

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

Function: createShadowRootUi() ​

createShadowRootUi<TMounted>(ctx, options): Promise<ShadowRootContentScriptUi<TMounted>>

Create a content script UI inside a ShadowRoot.

This function is async because it has to load the CSS via a network call.

Type parameters ​

▪ TMounted

Parameters ​

▪ ctx: ContentScriptContext

▪ options: ShadowRootContentScriptUiOptions<TMounted>

Shadow root options. See ContentScriptUiOptions for shared positioning, anchoring, append, and removal options.

Returns ​

See ​

https://wxt.dev/guide/essentials/content-scripts.html#shadow-root

Source ​

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


Generated using typedoc-plugin-markdown and TypeDoc