chore: document deprecated webContents.getPrinters API (#39356)
* chore: document deprecated webContents.getPrinters API * chore: remove duplicate deprecation warning
This commit is contained in:
parent
1ce2fdd63d
commit
11600c5f96
1 changed files with 18 additions and 0 deletions
|
@ -27,6 +27,24 @@ The `ipcRenderer.sendTo()` API has been deprecated. It should be replaced by set
|
||||||
|
|
||||||
The `senderId` and `senderIsMainFrame` properties of `IpcRendererEvent` have been deprecated as well.
|
The `senderId` and `senderIsMainFrame` properties of `IpcRendererEvent` have been deprecated as well.
|
||||||
|
|
||||||
|
## Planned Breaking API Changes (26.0)
|
||||||
|
|
||||||
|
### Deprecated: `webContents.getPrinters`
|
||||||
|
|
||||||
|
The `webContents.getPrinters` method has been deprecated. Use
|
||||||
|
`webContents.getPrintersAsync` instead.
|
||||||
|
|
||||||
|
```js
|
||||||
|
const w = new BrowserWindow({ show: false })
|
||||||
|
|
||||||
|
// Deprecated
|
||||||
|
console.log(w.webContents.getPrinters())
|
||||||
|
// Replace with
|
||||||
|
w.webContents.getPrintersAsync().then((printers) => {
|
||||||
|
console.log(printers)
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
## Planned Breaking API Changes (25.0)
|
## Planned Breaking API Changes (25.0)
|
||||||
|
|
||||||
### Deprecated: `protocol.{register,intercept}{Buffer,String,Stream,File,Http}Protocol`
|
### Deprecated: `protocol.{register,intercept}{Buffer,String,Stream,File,Http}Protocol`
|
||||||
|
|
Loading…
Reference in a new issue