From 5bb7d518b3e6b07e07819fc41f10519be22b0c74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Neto?= Date: Wed, 31 Oct 2018 17:57:48 -0300 Subject: [PATCH 1/3] docs: apply arrow functions to app.makeSingleInstance example --- docs/api/breaking-changes.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/breaking-changes.md b/docs/api/breaking-changes.md index ec897a1bc13aa..4793852939fc7 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) => { + /* ... */ }) ``` From bd2478f0c15753cd63a380b6a4e5409e99e89609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Neto?= Date: Wed, 31 Oct 2018 17:59:34 -0300 Subject: [PATCH 2/3] docs: apply arrow functions to session docs --- docs/api/breaking-changes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/breaking-changes.md b/docs/api/breaking-changes.md index 4793852939fc7..6fa271728f2f6 100644 --- a/docs/api/breaking-changes.md +++ b/docs/api/breaking-changes.md @@ -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) }) ``` From e244c6176f7a659a71ec0ab2862c22e6ac44ff50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Neto?= Date: Wed, 31 Oct 2018 19:46:28 -0300 Subject: [PATCH 3/3] docs: change normal to arrow functions in File object docs --- docs/api/file-object.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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: