📝 Update API documentation to ES6 [ci skip]
This commit is contained in:
parent
178496afe5
commit
5a9f28e034
28 changed files with 168 additions and 176 deletions
|
@ -5,9 +5,9 @@ microphone, camera, or screen.
|
|||
|
||||
```javascript
|
||||
// In the renderer process.
|
||||
var desktopCapturer = require('electron').desktopCapturer;
|
||||
var { desktopCapturer } = require('electron');
|
||||
|
||||
desktopCapturer.getSources({types: ['window', 'screen']}, function(error, sources) {
|
||||
desktopCapturer.getSources({types: ['window', 'screen']}, (error, sources) => {
|
||||
if (error) throw error;
|
||||
for (var i = 0; i < sources.length; ++i) {
|
||||
if (sources[i].name == "Electron") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue