feat: add options to webContents.loadFile (#14515)

This commit is contained in:
Milan Burda 2018-09-11 09:56:49 +02:00 committed by Samuel Attard
parent 7a766e82f9
commit 58577bd431
8 changed files with 31 additions and 29 deletions

View file

@ -1221,9 +1221,13 @@ win.loadURL('http://localhost:8000/post', {
})
```
#### `win.loadFile(filePath)`
#### `win.loadFile(filePath[, options])`
* `filePath` String
* `options` Object (optional)
* `query` Object (optional) - Passed to `url.format()`.
* `search` String (optional) - Passed to `url.format()`.
* `hash` String (optional) - Passed to `url.format()`.
Same as `webContents.loadFile`, `filePath` should be a path to an HTML
file relative to the root of your application. See the `webContents` docs

View file

@ -647,9 +647,13 @@ const options = {extraHeaders: 'pragma: no-cache\n'}
webContents.loadURL('https://github.com', options)
```
#### `contents.loadFile(filePath)`
#### `contents.loadFile(filePath[, options])`
* `filePath` String
* `options` Object (optional)
* `query` Object (optional) - Passed to `url.format()`.
* `search` String (optional) - Passed to `url.format()`.
* `hash` String (optional) - Passed to `url.format()`.
Loads the given file in the window, `filePath` should be a path to
an HTML file relative to the root of your application. For instance