chore: update to standard 12

This commit is contained in:
Samuel Attard 2018-09-14 02:10:51 +10:00
parent 9e85bdb02c
commit 558fff69e7
No known key found for this signature in database
GPG key ID: E89DDE5742D58C4E
198 changed files with 4455 additions and 2940 deletions

View file

@ -10,9 +10,9 @@ title is `Electron`:
```javascript
// In the renderer process.
const {desktopCapturer} = require('electron')
const { desktopCapturer } = require('electron')
desktopCapturer.getSources({types: ['window', 'screen']}, (error, sources) => {
desktopCapturer.getSources({ types: ['window', 'screen'] }, (error, sources) => {
if (error) throw error
for (let i = 0; i < sources.length; ++i) {
if (sources[i].name === 'Electron') {
@ -28,9 +28,8 @@ desktopCapturer.getSources({types: ['window', 'screen']}, (error, sources) => {
maxHeight: 720
}
}
})
.then((stream) => handleStream(stream))
.catch((e) => handleError(e))
}).then((stream) => handleStream(stream))
.catch((e) => handleError(e))
return
}
}