refactor: remove redundant NativeImage::GetBitmap() (#46696)
* refactor: remove redundant NativeImage::GetBitmap() * docs: mark NativeImage.getBitmap() as deprecated * have getBitmap() emit a deprecation warning * docs: update obsolete refefence to getBitmap() * test: update obsolete refefences to getBitmap() --------- Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
This commit is contained in:
parent
dd03cceda0
commit
686ae47696
7 changed files with 36 additions and 22 deletions
|
@ -45,6 +45,19 @@ window is not currently visible.
|
|||
|
||||
If you were using `app.commandLine` to control the behavior of the main process, you should do this via `process.argv`.
|
||||
|
||||
### Deprecated: `NativeImage.getBitmap()`
|
||||
|
||||
`NativeImage.toBitmap()` returns a newly-allocated copy of the bitmap. `NativeImage.getBitmap()` was originally an alternative function that returned the original instead of a copy. This changed when sandboxing was introduced, so both return a copy and are functionally equivalent.
|
||||
|
||||
Client code should call `NativeImage.toBitmap()` instead:
|
||||
|
||||
```js
|
||||
// Deprecated
|
||||
bitmap = image.getBitmap()
|
||||
// Use this instead
|
||||
bitmap = image.toBitmap()
|
||||
```
|
||||
|
||||
## Planned Breaking API Changes (36.0)
|
||||
|
||||
### Utility Process unhandled rejection behavior change
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue