refactor: ginify BrowserView (#23578)

This commit is contained in:
Jeremy Rose 2020-07-09 08:48:39 -07:00 committed by GitHub
parent 66d65a6d35
commit 9bd0fc5348
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 128 additions and 165 deletions

View file

@ -28,25 +28,6 @@ view.webContents.loadURL('https://electronjs.org')
* `options` Object (optional)
* `webPreferences` Object (optional) - See [BrowserWindow](browser-window.md).
### Static Methods
#### `BrowserView.getAllViews()`
Returns `BrowserView[]` - An array of all opened BrowserViews.
#### `BrowserView.fromWebContents(webContents)`
* `webContents` [WebContents](web-contents.md)
Returns `BrowserView | null` - The BrowserView that owns the given `webContents`
or `null` if the contents are not owned by a BrowserView.
#### `BrowserView.fromId(id)`
* `id` Integer
Returns `BrowserView` - The view with the given `id`.
### Instance Properties
Objects created with `new BrowserView` have the following properties:
@ -55,10 +36,6 @@ Objects created with `new BrowserView` have the following properties:
A [`WebContents`](web-contents.md) object owned by this view.
#### `view.id` _Experimental_
A `Integer` representing the unique ID of the view.
### Instance Methods
Objects created with `new BrowserView` have the following instance methods: