Skip to content

ElectronWebContents.insertCSS method

ElectronWebContents › insertCSS

Unofficial

Injects CSS into the current web page and returns a unique key for the inserted stylesheet.

Signature:

insertCSS(css: string, options?: ElectronInsertCSSOptions | undefined): Promise<string>

Parameters:

ParameterTypeDescription
cssstringThe CSS to inject.
options?ElectronInsertCSSOptions | undefinedOptions for inserting the CSS.

Returns: Promise<string>A promise resolving with the key for the inserted CSS.