docs: Added loadFile instead of loadURL in BrowserWindow documentation example (#28829)
* Added loadFile instead of loadURL in the example For loading a local file the loadFile API is a better way to load any html file in the Renderer process. Have changed it in the example. * Changed backticks to single quote to correct for linting error In order to correct the linting error reported by the bot, I have changed backticks to single quote in the example.
This commit is contained in:
parent
0f898b2260
commit
dd80952877
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ const win = new BrowserWindow({ width: 800, height: 600 })
|
|||
win.loadURL('https://github.com')
|
||||
|
||||
// Or load a local HTML file
|
||||
win.loadURL(`file://${__dirname}/app/index.html`)
|
||||
win.loadFile('index.html')
|
||||
```
|
||||
|
||||
## Frameless window
|
||||
|
|
Loading…
Reference in a new issue