API > wxt/browser > Browser > scripting > insertCSS
Function: insertCSS()
insertCSS(injection)
insertCSS(
injection):Promise<void>
Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored.
Parameters
▪ injection: CSSInjection
The details of the styles to insert.
Returns
The insertCSS method provides its result via callback or returned as a Promise (MV3 only). It has no parameters.
Source
packages/browser/src/gen/index.d.ts:9706
insertCSS(injection, callback)
insertCSS(
injection,callback):void
Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored.
Parameters
▪ injection: CSSInjection
The details of the styles to insert.
▪ callback: () => void
Invoked upon completion of the injection.
Source
packages/browser/src/gen/index.d.ts:9715
Generated using typedoc-plugin-markdown and TypeDoc