Skip to content

Instantly share code, notes, and snippets.

@gerhardberger
Created January 14, 2017 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerhardberger/7e27a9a30cf45d16a876d4a3c9a5c238 to your computer and use it in GitHub Desktop.
Save gerhardberger/7e27a9a30cf45d16a876d4a3c9a5c238 to your computer and use it in GitHub Desktop.
const { app, BrowserWindow } = require('electron')
let win
app.on('ready', () => {
win = new BrowserWindow({
width: 800,
height: 600
})
win.loadURL('https://www.youtube.com')
win.webContents.on('did-navigate-in-page', (event, url) => {
console.log('Navigated to', url)
console.log('getURL:', win.webContents.getURL())
console.log('getTitle:', win.webContents.getTitle())
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment