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:

Parameter Type Description
css string The CSS to inject.
options? ElectronInsertCSSOptions | undefined Options for inserting the CSS.

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