mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Add destroyed event for webContents.
This commit is contained in:
@@ -39,6 +39,7 @@ void WebContents::WebContentsDestroyed(content::WebContents*) {
|
||||
// directly.
|
||||
RenderViewDeleted(web_contents_->GetRenderViewHost());
|
||||
|
||||
Emit("destroyed");
|
||||
web_contents_ = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ BrowserWindow::_init = ->
|
||||
@setMenu menu if menu?
|
||||
|
||||
@webContents = @getWebContents()
|
||||
@webContents.once 'destroyed', => @webContents = null
|
||||
|
||||
# Define getter for devToolsWebContents.
|
||||
devToolsWebContents = null
|
||||
|
||||
Reference in New Issue
Block a user