Skip to content
Snippets Groups Projects
Commit 391f6dd6 authored by Gavin Wang's avatar Gavin Wang Committed by Samuel Attard
Browse files

docs: add sample code for contents.insertCSS() (#16959)

it not work before Event: 'did-finish-load', so add this sample code to show it.
parent 7f007109
No related merge requests found
......@@ -943,6 +943,12 @@ Returns `String` - The user agent for this web page.
Injects CSS into the current web page.
```js
contents.on('did-finish-load', function () {
contents.insertCSS('html, body { background-color: #f00; }')
})
```
#### `contents.executeJavaScript(code[, userGesture, callback])`
* `code` String
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment