API > wxt/client > ContentScriptAnchoredOptions
Interface: ContentScriptAnchoredOptions
Contents
Properties
anchor
anchor?:
null
|string
|Element
| () =>undefined
|null
|string
|Element
A CSS selector, XPath expression, element, or function that returns one of the three. Along with append
, the anchor
dictates where in the page the UI will be added.
Source
packages/wxt/src/client/content-scripts/ui/types.ts:201
append
append?:
ContentScriptAppendMode
| (anchor
,ui
) =>void
In combination with anchor
, decide how to add the UI to the DOM.
"last"
(default) - Add the UI as the last child of theanchor
element"first"
- Add the UI as the first child of theanchor
element"replace"
- Replace theanchor
element with the UI."before"
- Add the UI as the sibling before theanchor
element"after"
- Add the UI as the sibling after theanchor
element(anchor, ui) => void
- Customizable function that let's you add the UI to the DOM
Source
packages/wxt/src/client/content-scripts/ui/types.ts:217
Generated using typedoc-plugin-markdown and TypeDoc