Skip to content

API > wxt > IsolatedWorldContentScriptEntrypointOptions

Interface: IsolatedWorldContentScriptEntrypointOptions

Contents

Extends

Properties

allFrames

allFrames?: PerBrowserOption<undefined | boolean>

See https://developer.chrome.com/docs/extensions/mv3/content_scripts/

Default

ts
false

Inherited from

BaseContentScriptEntrypointOptions.allFrames

Source

packages/wxt/src/types.ts:624


cssInjectionMode

cssInjectionMode?: PerBrowserOption<"manifest" | "manual" | "ui">

Customize how imported/generated styles are injected with the content script. Regardless of the mode selected, CSS will always be built and included in the output directory.

  • "manifest" - Include the CSS in the manifest, under the content script's css array.
  • "manual" - Exclude the CSS from the manifest. You are responsible for manually loading it onto the page. Use browser.runtime.getURL("content-scripts/<name>.css") to get the file's URL
  • "ui" - Exclude the CSS from the manifest. CSS will be automatically added to your UI when calling createShadowRootUi

Default

ts
"manifest"

Inherited from

BaseContentScriptEntrypointOptions.cssInjectionMode

Source

packages/wxt/src/types.ts:643


exclude

exclude?: string[]

List of target browsers to exclude this entrypoint from. Cannot be used with include. You must choose one of the two options.

Default

ts
undefined

Inherited from

BaseContentScriptEntrypointOptions.exclude

Source

packages/wxt/src/types.ts:574


excludeGlobs

excludeGlobs?: PerBrowserOption<undefined | string[]>

See https://developer.chrome.com/docs/extensions/mv3/content_scripts/

Default

ts
[]

Inherited from

BaseContentScriptEntrypointOptions.excludeGlobs

Source

packages/wxt/src/types.ts:619


excludeMatches

excludeMatches?: PerBrowserOption<undefined | string[]>

See https://developer.chrome.com/docs/extensions/mv3/content_scripts/

Default

ts
[]

Inherited from

BaseContentScriptEntrypointOptions.excludeMatches

Source

packages/wxt/src/types.ts:609


include

include?: string[]

List of target browsers to include this entrypoint in. Defaults to being included in all builds. Cannot be used with exclude. You must choose one of the two options.

Default

ts
undefined

Inherited from

BaseContentScriptEntrypointOptions.include

Source

packages/wxt/src/types.ts:567


includeGlobs

includeGlobs?: PerBrowserOption<undefined | string[]>

See https://developer.chrome.com/docs/extensions/mv3/content_scripts/

Default

ts
[]

Inherited from

BaseContentScriptEntrypointOptions.includeGlobs

Source

packages/wxt/src/types.ts:614


matchAboutBlank

matchAboutBlank?: PerBrowserOption<undefined | boolean>

See https://developer.chrome.com/docs/extensions/mv3/content_scripts/

Default

ts
false

Inherited from

BaseContentScriptEntrypointOptions.matchAboutBlank

Source

packages/wxt/src/types.ts:602


matchOriginAsFallback

matchOriginAsFallback?: PerBrowserOption<boolean>

See https://developer.chrome.com/docs/extensions/mv3/content_scripts/

Default

ts
false

Inherited from

BaseContentScriptEntrypointOptions.matchOriginAsFallback

Source

packages/wxt/src/types.ts:629


matches

matches?: PerBrowserOption<string[]>

Inherited from

BaseContentScriptEntrypointOptions.matches

Source

packages/wxt/src/types.ts:592


registration

registration?: PerBrowserOption<"runtime" | "manifest">

Specify how the content script is registered.

  • "manifest": The content script will be added to the content_scripts entry in the manifest. This is the normal and most well known way of registering a content script.
  • "runtime": The content script's matches is added to host_permissions and you are responsible for using the scripting API to register/execute the content script dynamically at runtime.

Default

ts
"manifest"

Inherited from

BaseContentScriptEntrypointOptions.registration

Source

packages/wxt/src/types.ts:655


runAt

runAt?: PerBrowserOption<undefined | RunAt>

See https://developer.chrome.com/docs/extensions/mv3/content_scripts/

Default

ts
"documentIdle"

Inherited from

BaseContentScriptEntrypointOptions.runAt

Source

packages/wxt/src/types.ts:597


world

world?: "ISOLATED"

See https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts#isolated_world

Default

ts
"ISOLATED"

Source

packages/wxt/src/types.ts:672


Generated using typedoc-plugin-markdown and TypeDoc