diff --git a/docs/api/app.md b/docs/api/app.md
index 56586ab5b2..ce3a719754 100644
--- a/docs/api/app.md
+++ b/docs/api/app.md
@@ -210,7 +210,7 @@ certificate from the store.
app.on('select-client-certificate', function(event, webContents, url, list, callback) {
event.preventDefault();
callback(list[0]);
-})
+});
```
### Event: 'login'
@@ -241,7 +241,7 @@ should prevent the default behavior with `event.preventDefault()` and call
app.on('login', (event, webContents, request, authInfo, callback) => {
event.preventDefault();
callback('username', 'secret');
-})
+});
```
### Event: 'gpu-process-crashed'
diff --git a/docs/api/content-tracing.md b/docs/api/content-tracing.md
index 8df1ca6998..04e7f5a9b5 100644
--- a/docs/api/content-tracing.md
+++ b/docs/api/content-tracing.md
@@ -13,7 +13,7 @@ const {contentTracing} = require('electron');
const options = {
categoryFilter: '*',
traceOptions: 'record-until-full,enable-sampling'
-}
+};
contentTracing.startRecording(options, function() {
console.log('Tracing started');
diff --git a/docs/api/protocol.md b/docs/api/protocol.md
index 18ce612d02..83481dd651 100644
--- a/docs/api/protocol.md
+++ b/docs/api/protocol.md
@@ -6,18 +6,18 @@ An example of implementing a protocol that has the same effect as the
`file://` protocol:
```javascript
-const {app, protocol} = require('electron')
-const path = require('path')
+const {app, protocol} = require('electron');
+const path = require('path');
app.on('ready', function () {
protocol.registerFileProtocol('atom', function (request, callback) {
- const url = request.url.substr(7)
- callback({path: path.normalize(__dirname + '/' + url)})
+ const url = request.url.substr(7);
+ callback({path: path.normalize(__dirname + '/' + url)});
}, function (error) {
if (error)
- console.error('Failed to register protocol')
- })
-})
+ console.error('Failed to register protocol');
+ });
+});
```
**Note:** All methods unless specified can only be used after the `ready` event
of the `app` module gets emitted.
@@ -52,10 +52,10 @@ So if you want to register a custom protocol to replace the `http` protocol, you
have to register it as standard scheme:
```javascript
-protocol.registerStandardSchemes(['atom'])
+protocol.registerStandardSchemes(['atom']);
app.on('ready', function () {
- protocol.registerHttpProtocol('atom', ...)
-})
+ protocol.registerHttpProtocol('atom', ...);
+});
```
**Note:** This method can only be used before the `ready` event of the `app`
@@ -123,7 +123,7 @@ protocol.registerBufferProtocol('atom', (request, callback) => {
callback({mimeType: 'text/html', data: new Buffer('
Response
')});
}, (error) => {
if (error)
- console.error('Failed to register protocol')
+ console.error('Failed to register protocol');
});
```
diff --git a/docs/api/remote.md b/docs/api/remote.md
index 87f73faa63..c95df4369e 100644
--- a/docs/api/remote.md
+++ b/docs/api/remote.md
@@ -70,11 +70,11 @@ For instance you can't use a function from the renderer process in an
// main process mapNumbers.js
exports.withRendererCallback = (mapper) => {
return [1,2,3].map(mapper);
-}
+};
exports.withLocalCallback = () => {
return exports.mapNumbers(x => x + 1);
-}
+};
```
```javascript
@@ -83,9 +83,9 @@ const mapNumbers = require('remote').require('./mapNumbers');
const withRendererCb = mapNumbers.withRendererCallback(x => x + 1);
-const withLocalCb = mapNumbers.withLocalCallback()
+const withLocalCb = mapNumbers.withLocalCallback();
-console.log(withRendererCb, withLocalCb) // [true, true, true], [2, 3, 4]
+console.log(withRendererCb, withLocalCb); // [true, true, true], [2, 3, 4]
```
As you can see, the renderer callback's synchronous return value was not as
diff --git a/docs/api/synopsis.md b/docs/api/synopsis.md
index 159e67f0f3..01b6e2db4d 100644
--- a/docs/api/synopsis.md
+++ b/docs/api/synopsis.md
@@ -88,7 +88,7 @@ process.env.ELECTRON_HIDE_INTERNAL_MODULES = 'true'
Or call the `hideInternalModules` API:
```javascript
-require('electron').hideInternalModules()
+require('electron').hideInternalModules();
```
[gui]: https://en.wikipedia.org/wiki/Graphical_user_interface
diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md
index f5c3d386de..5cf385dde9 100644
--- a/docs/api/web-contents.md
+++ b/docs/api/web-contents.md
@@ -385,7 +385,7 @@ use the `pragma` header to achieve it.
```javascript
const options = {extraHeaders: 'pragma: no-cache\n'};
-webContents.loadURL(url, options)
+webContents.loadURL(url, options);
```
### `webContents.downloadURL(url)`
@@ -942,7 +942,7 @@ win.webContents.debugger.on('message', (event, method, params) => {
if (params.request.url === 'https://www.github.com')
win.webContents.debugger.detach();
}
-})
+});
win.webContents.debugger.sendCommand('Network.enable');
```
diff --git a/docs/api/web-view-tag.md b/docs/api/web-view-tag.md
index 481d0b2dec..055642c13d 100644
--- a/docs/api/web-view-tag.md
+++ b/docs/api/web-view-tag.md
@@ -37,15 +37,15 @@ and displays a "loading..." message during the load time:
const loadstart = () => {
indicator.innerText = 'loading...';
- }
+ };
const loadstop = () => {
indicator.innerText = '';
- }
+ };
webview.addEventListener('did-start-loading', loadstart);
webview.addEventListener('did-stop-loading', loadstop);
- }
+ };
```
diff --git a/docs/faq/electron-faq.md b/docs/faq/electron-faq.md
index 68714d69ad..94a4c6714b 100644
--- a/docs/faq/electron-faq.md
+++ b/docs/faq/electron-faq.md
@@ -65,7 +65,7 @@ code from this:
```javascript
app.on('ready', () => {
const tray = new Tray('/path/to/icon.png');
-})
+});
```
to this:
@@ -74,7 +74,7 @@ to this:
let tray = null;
app.on('ready', () => {
tray = new Tray('/path/to/icon.png');
-})
+});
```
## I can not use jQuery/RequireJS/Meteor/AngularJS in Electron.
diff --git a/docs/styleguide.md b/docs/styleguide.md
index cd68414ac2..a34889d2ca 100644
--- a/docs/styleguide.md
+++ b/docs/styleguide.md
@@ -93,6 +93,6 @@ this event it might look something like this:
```javascript
Alarm.on('wake-up', (time) => {
- console.log(time)
-})
+ console.log(time);
+});
```
diff --git a/docs/tutorial/desktop-environment-integration.md b/docs/tutorial/desktop-environment-integration.md
index dd7826cdf0..0253f586d4 100644
--- a/docs/tutorial/desktop-environment-integration.md
+++ b/docs/tutorial/desktop-environment-integration.md
@@ -23,8 +23,8 @@ let myNotification = new Notification('Title', {
});
myNotification.onclick = function () {
- console.log('Notification clicked')
-}
+ console.log('Notification clicked');
+};
```
While code and user experience across operating systems are similar, there
diff --git a/docs/tutorial/quick-start.md b/docs/tutorial/quick-start.md
index 88f81ecc54..6826b244bb 100644
--- a/docs/tutorial/quick-start.md
+++ b/docs/tutorial/quick-start.md
@@ -80,7 +80,7 @@ The `main.js` should create windows and handle system events, a typical
example being:
```javascript
-const electron = require('electron')
+const electron = require('electron');
// Module to control application life.
const app = electron.app;
// Module to create native browser window.
diff --git a/docs/tutorial/using-widevine-cdm-plugin.md b/docs/tutorial/using-widevine-cdm-plugin.md
index 26590250ed..d1afae8558 100644
--- a/docs/tutorial/using-widevine-cdm-plugin.md
+++ b/docs/tutorial/using-widevine-cdm-plugin.md
@@ -66,7 +66,7 @@ app.on('ready', () => {
// The `plugins` have to be enabled.
plugins: true
}
- })
+ });
});
```