Electron API History Migration Guide
This document demonstrates how to add API History blocks to existing APIs.
API history information
Here are some resources you can use to find information on the history of an API:
重大更改
个添加
git blame
- Release notes
electron-api-historian
示例
info
The associated API is already removed, we will ignore that for the purpose of this example.
If we search through breaking-changes.md
we can find
a function that was deprecated in Electron 25.0
.
<!-- docs/breaking-changes.md -->
### Deprecated: `BrowserWindow.getTrafficLightPosition()`
`BrowserWindow.getTrafficLightPosition()` has been deprecated, the
`BrowserWindow.getWindowButtonPosition()` API should be used instead
which returns `null` instead of `{ x: 0, y: 0 }` when there is no custom
position.
<!-- docs/api/browser-window.md -->
#### `win.getTrafficLightPosition()` _macOS_ _Deprecated_
Returns `Point` - The custom position for the traffic light buttons in
frameless window, `{ x: 0, y: 0 }` will be returned when there is no custom
position.