This commit is contained in:
Felix Rieseberg 2017-11-22 16:59:00 -08:00
Π ΠΎΠ΄ΠΈΡ‚Π΅Π»ΡŒ 3cb062b3d6
ΠšΠΎΠΌΠΌΠΈΡ‚ 4d18cbe728
1 ΠΈΠ·ΠΌΠ΅Π½Ρ‘Π½Π½Ρ‹Ρ… Ρ„Π°ΠΉΠ»ΠΎΠ²: 8 Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠΉ ΠΈ 0 ΡƒΠ΄Π°Π»Π΅Π½ΠΈΠΉ

ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -5,4 +5,12 @@ const {BrowserView} = process.atomBinding('browser_view')
Object.setPrototypeOf(BrowserView.prototype, EventEmitter.prototype)
BrowserView.fromWebContents = (webContents) => {
for (const view of BrowserView.getAllViews()) {
if (view.webContents.equal(webContents)) return window
}
return null
}
module.exports = BrowserView