feat: add options to webContents.loadFile (#14515)
This commit is contained in:
parent
7a766e82f9
commit
58577bd431
8 changed files with 31 additions and 29 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue