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:

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

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