buffer.
```javascript
+const {BrowserWindow} = require('electron')
+
let win = new BrowserWindow({webPreferences: {offscreen: true}})
win.webContents.on('paint', (event, dirty, image) => {
- fs.writeSync('frame.png', image.toPNG())
+ // updateBitmap(dirty, image.toBitmap())
})
win.loadURL('http://github.com')
```
})
win.loadURL('http://github.com')
win.webContents.on('paint', (event, dirty, image) => {
- fs.writeSync('frame.png', image.toPNG())
+ // updateBitmap(dirty, image.toBitmap())
})
win.webContents.setFrameRate(30)
})