📝 Match variable names
[ci skip]
This commit is contained in:
parent
f1b184ef78
commit
885aeec442
3 changed files with 11 additions and 11 deletions
|
@ -10,7 +10,7 @@ image file path as a `String`:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const appIcon = new Tray('/Users/somebody/images/icon.png');
|
const appIcon = new Tray('/Users/somebody/images/icon.png');
|
||||||
let window = new BrowserWindow({icon: '/Users/somebody/images/window.png'});
|
let win = new BrowserWindow({icon: '/Users/somebody/images/window.png'});
|
||||||
```
|
```
|
||||||
|
|
||||||
Or read the image from the clipboard which returns a `nativeImage`:
|
Or read the image from the clipboard which returns a `nativeImage`:
|
||||||
|
|
|
@ -21,11 +21,11 @@ The main process script is just like a normal Node.js script:
|
||||||
```javascript
|
```javascript
|
||||||
const {app, BrowserWindow} = require('electron');
|
const {app, BrowserWindow} = require('electron');
|
||||||
|
|
||||||
let window = null;
|
let win = null;
|
||||||
|
|
||||||
app.on('ready', () => {
|
app.on('ready', () => {
|
||||||
window = new BrowserWindow({width: 800, height: 600});
|
win = new BrowserWindow({width: 800, height: 600});
|
||||||
window.loadURL('https://github.com');
|
win.loadURL('https://github.com');
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -267,8 +267,8 @@ To set the progress bar for a Window, you can use the
|
||||||
[BrowserWindow.setProgressBar][setprogressbar] API:
|
[BrowserWindow.setProgressBar][setprogressbar] API:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
let window = new BrowserWindow({...});
|
let win = new BrowserWindow({...});
|
||||||
window.setProgressBar(0.5);
|
win.setProgressBar(0.5);
|
||||||
```
|
```
|
||||||
|
|
||||||
## Icon Overlays in Taskbar (Windows)
|
## Icon Overlays in Taskbar (Windows)
|
||||||
|
@ -294,8 +294,8 @@ To set the overlay icon for a window, you can use the
|
||||||
[BrowserWindow.setOverlayIcon][setoverlayicon] API:
|
[BrowserWindow.setOverlayIcon][setoverlayicon] API:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
let window = new BrowserWindow({...});
|
let win = new BrowserWindow({...});
|
||||||
window.setOverlayIcon('path/to/overlay.png', 'Description for overlay');
|
win.setOverlayIcon('path/to/overlay.png', 'Description for overlay');
|
||||||
```
|
```
|
||||||
|
|
||||||
## Represented File of Window (OS X)
|
## Represented File of Window (OS X)
|
||||||
|
@ -316,9 +316,9 @@ To set the represented file of window, you can use the
|
||||||
[BrowserWindow.setDocumentEdited][setdocumentedited] APIs:
|
[BrowserWindow.setDocumentEdited][setdocumentedited] APIs:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
let window = new BrowserWindow({...});
|
let win = new BrowserWindow({...});
|
||||||
window.setRepresentedFilename('/etc/passwd');
|
win.setRepresentedFilename('/etc/passwd');
|
||||||
window.setDocumentEdited(true);
|
win.setDocumentEdited(true);
|
||||||
```
|
```
|
||||||
|
|
||||||
[addrecentdocument]: ../api/app.md#appaddrecentdocumentpath-os-x-windows
|
[addrecentdocument]: ../api/app.md#appaddrecentdocumentpath-os-x-windows
|
||||||
|
|
Loading…
Add table
Reference in a new issue