chore: update to standard 12
This commit is contained in:
parent
9e85bdb02c
commit
558fff69e7
198 changed files with 4455 additions and 2940 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue