From cfbea4a0e31ddb576802bb0f21802b4593011d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Neto?= Date: Wed, 5 Dec 2018 09:14:52 -0300 Subject: [PATCH] docs: es6ify 'Breaking Changes' and 'File' API pages (#15507) * docs: apply arrow functions to app.makeSingleInstance example * docs: apply arrow functions to session docs * docs: change normal to arrow functions in File object docs --- docs/api/breaking-changes.md | 12 ++++++------ docs/api/file-object.md | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/api/breaking-changes.md b/docs/api/breaking-changes.md index ec897a1bc13aa..6fa271728f2f6 100644 --- a/docs/api/breaking-changes.md +++ b/docs/api/breaking-changes.md @@ -30,13 +30,13 @@ The following list includes the breaking API changes planned for Electron 4.0. ```js // Deprecated -app.makeSingleInstance(function (argv, cwd) { - +app.makeSingleInstance((argv, cwd) => { + /* ... */ }) // Replace with app.requestSingleInstanceLock() -app.on('second-instance', function (event, argv, cwd) { - +app.on('second-instance', (event, argv, cwd) => { + /* ... */ }) ``` @@ -212,11 +212,11 @@ screen.getPrimaryDisplay().workArea ```js // Deprecated -ses.setCertificateVerifyProc(function (hostname, certificate, callback) { +ses.setCertificateVerifyProc((hostname, certificate, callback) => { callback(true) }) // Replace with -ses.setCertificateVerifyProc(function (request, callback) { +ses.setCertificateVerifyProc((request, callback) => { callback(0) }) ``` diff --git a/docs/api/file-object.md b/docs/api/file-object.md index 9c582065f9176..ea0ec4e4ecb95 100644 --- a/docs/api/file-object.md +++ b/docs/api/file-object.md @@ -15,15 +15,15 @@ Example of getting a real path from a dragged-onto-the-app file: