📝 Update API documentation to ES6 [ci skip]

This commit is contained in:
Steve Kinney 2016-05-04 11:59:02 -06:00
parent 178496afe5
commit 5a9f28e034
28 changed files with 168 additions and 176 deletions

View file

@ -12,12 +12,11 @@ event of the app module is emitted.
```javascript
const electron = require('electron');
const app = electron.app;
const globalShortcut = electron.globalShortcut;
const { app, globalShortcut } = electron;
app.on('ready', function() {
app.on('ready', () => {
// Register a 'CommandOrControl+X' shortcut listener.
var ret = globalShortcut.register('CommandOrControl+X', function() {
const ret = globalShortcut.register('CommandOrControl+X', function() {
console.log('CommandOrControl+X is pressed');
});
@ -29,7 +28,7 @@ app.on('ready', function() {
console.log(globalShortcut.isRegistered('CommandOrControl+X'));
});
app.on('will-quit', function() {
app.on('will-quit', () => {
// Unregister a shortcut.
globalShortcut.unregister('CommandOrControl+X');