From 885aeec4428dc975628d6daf59654310bcca50a2 Mon Sep 17 00:00:00 2001 From: Plusb Preco Date: Wed, 11 May 2016 02:16:32 +0900 Subject: [PATCH] :memo: Match variable names [ci skip] --- docs/api/native-image.md | 2 +- docs/api/synopsis.md | 6 +++--- docs/tutorial/desktop-environment-integration.md | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/api/native-image.md b/docs/api/native-image.md index 6d42ca1..b8479ac 100644 --- a/docs/api/native-image.md +++ b/docs/api/native-image.md @@ -10,7 +10,7 @@ image file path as a `String`: ```javascript 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`: diff --git a/docs/api/synopsis.md b/docs/api/synopsis.md index 01b6e2d..abce904 100644 --- a/docs/api/synopsis.md +++ b/docs/api/synopsis.md @@ -21,11 +21,11 @@ The main process script is just like a normal Node.js script: ```javascript const {app, BrowserWindow} = require('electron'); -let window = null; +let win = null; app.on('ready', () => { - window = new BrowserWindow({width: 800, height: 600}); - window.loadURL('https://github.com'); + win = new BrowserWindow({width: 800, height: 600}); + win.loadURL('https://github.com'); }); ``` diff --git a/docs/tutorial/desktop-environment-integration.md b/docs/tutorial/desktop-environment-integration.md index 72ba75d..c552abb 100644 --- a/docs/tutorial/desktop-environment-integration.md +++ b/docs/tutorial/desktop-environment-integration.md @@ -267,8 +267,8 @@ To set the progress bar for a Window, you can use the [BrowserWindow.setProgressBar][setprogressbar] API: ```javascript -let window = new BrowserWindow({...}); -window.setProgressBar(0.5); +let win = new BrowserWindow({...}); +win.setProgressBar(0.5); ``` ## 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: ```javascript -let window = new BrowserWindow({...}); -window.setOverlayIcon('path/to/overlay.png', 'Description for overlay'); +let win = new BrowserWindow({...}); +win.setOverlayIcon('path/to/overlay.png', 'Description for overlay'); ``` ## 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: ```javascript -let window = new BrowserWindow({...}); -window.setRepresentedFilename('/etc/passwd'); -window.setDocumentEdited(true); +let win = new BrowserWindow({...}); +win.setRepresentedFilename('/etc/passwd'); +win.setDocumentEdited(true); ``` [addrecentdocument]: ../api/app.md#appaddrecentdocumentpath-os-x-windows -- 2.7.4