Merge pull request #11565 from electron/add-load-file-helper

Add window.loadFile and webContents.loadFile helper methods
This commit is contained in:
Samuel Attard 2018-01-23 09:08:23 +11:00 committed by GitHub
commit 32a1395bcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 0 deletions

View file

@ -1159,6 +1159,14 @@ win.loadURL('http://localhost:8000/post', {
})
```
#### `win.loadFile(filePath)`
* `filePath` String
Same as `webContents.loadFile`, `filePath` should be a path to an HTML
file relative to the root of your application. See the `webContents` docs
for more information.
#### `win.reload()`
Same as `webContents.reload`.