Skip to content

ElectronWebFrame.insertCSS method

ElectronWebFrame › 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): string

Parameters:

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

Returns: stringA key for the inserted CSS that can later be used to remove the CSS via removeInsertedCSS(key).