|
@@ -907,10 +907,10 @@ Returns `String` - The URL of the current web page.
|
|
|
```javascript
|
|
|
const { BrowserWindow } = require('electron')
|
|
|
let win = new BrowserWindow({ width: 800, height: 600 })
|
|
|
-win.loadURL('http://github.com')
|
|
|
-
|
|
|
-let currentURL = win.webContents.getURL()
|
|
|
-console.log(currentURL)
|
|
|
+win.loadURL('http://github.com').then(() => {
|
|
|
+ const currentURL = win.webContents.getURL()
|
|
|
+ console.log(currentURL)
|
|
|
+})
|
|
|
```
|
|
|
|
|
|
#### `contents.getTitle()`
|