mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
🔧 Add BrowserWindow.fromBrowserView()
This commit is contained in:
@@ -144,6 +144,12 @@ BrowserWindow.fromWebContents = (webContents) => {
|
||||
}
|
||||
}
|
||||
|
||||
BrowserWindow.fromBrowserView = (browserView) => {
|
||||
for (const window of BrowserWindow.getAllWindows()) {
|
||||
if (window.getBrowserView() === browserView) return window
|
||||
}
|
||||
}
|
||||
|
||||
BrowserWindow.fromDevToolsWebContents = (webContents) => {
|
||||
for (const window of BrowserWindow.getAllWindows()) {
|
||||
const {devToolsWebContents} = window
|
||||
|
||||
Reference in New Issue
Block a user