📝 Update FAQ to ES6 [ci skip]
This commit is contained in:
parent
afe0296e0f
commit
3271492c86
1 changed files with 5 additions and 5 deletions
|
@ -60,16 +60,16 @@ If you want a quick fix, you can make the variables global by changing your
|
||||||
code from this:
|
code from this:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
app.on('ready', function() {
|
app.on('ready', () => {
|
||||||
var tray = new Tray('/path/to/icon.png');
|
const tray = new Tray('/path/to/icon.png');
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
to this:
|
to this:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var tray = null;
|
let tray = null;
|
||||||
app.on('ready', function() {
|
app.on('ready', () => {
|
||||||
tray = new Tray('/path/to/icon.png');
|
tray = new Tray('/path/to/icon.png');
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
@ -84,7 +84,7 @@ To solve this, you can turn off node integration in Electron:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// In the main process.
|
// In the main process.
|
||||||
var mainWindow = new BrowserWindow({
|
let mainWindow = new BrowserWindow({
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: false
|
nodeIntegration: false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue