fix: prevent crash if BrowserView webContents was destroyed (#25112)

This commit is contained in:
Shelley Vohr 2020-08-25 20:04:13 -07:00 committed by GitHub
parent c97f8109c2
commit c8a0b2b71d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 32 deletions

View file

@ -40,16 +40,6 @@ A [`WebContents`](web-contents.md) object owned by this view.
Objects created with `new BrowserView` have the following instance methods:
#### `view.destroy()`
Force closing the view, the `unload` and `beforeunload` events won't be emitted
for the web page. After you're done with a view, call this function in order to
free memory and other resources as soon as possible.
#### `view.isDestroyed()`
Returns `Boolean` - Whether the view is destroyed.
#### `view.setAutoResize(options)` _Experimental_
* `options` Object