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
This commit is contained in:
parent
d561c5531b
commit
cfbea4a0e3
2 changed files with 10 additions and 10 deletions
|
@ -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)
|
||||
})
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue