Skip to content

Commit

Permalink
document changes in api contract
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Nov 19, 2018
1 parent 032dda5 commit fa5b9d4
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/api/breaking-changes.md
Expand Up @@ -8,6 +8,29 @@ The `FIXME` string is used in code comments to denote things that should be fixe

# Planned Breaking API Changes (5.0)

## `app.getFileIcon(path[, options], callback)`

The `getFileIcon` function on `app` taking a callback is being deprecated in favor of a version returning a Promise.

```js
const path = 'some/path/to/your/icon'
// Deprecated
app.getFileIcon(path, (err, icon) => {
if (err) {
console.log('oh no an error!', err)
} else {
console.log(icon)
}
})
// Replace With
app.getFileIcon(path)
.then(icon => {
console.log(icon)
}).catch(err => {
console.log('oh no an error!', err)
})
```

## `new BrowserWindow({ webPreferences })`

The following `webPreferences` option default values are deprecated in favor of the new defaults listed below.
Expand Down

0 comments on commit fa5b9d4

Please sign in to comment.