Add destroyed event for webContents.
This commit is contained in:
parent
859606e88c
commit
744895f9d8
2 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,7 @@ void WebContents::WebContentsDestroyed(content::WebContents*) {
|
||||||
// directly.
|
// directly.
|
||||||
RenderViewDeleted(web_contents_->GetRenderViewHost());
|
RenderViewDeleted(web_contents_->GetRenderViewHost());
|
||||||
|
|
||||||
|
Emit("destroyed");
|
||||||
web_contents_ = NULL;
|
web_contents_ = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ BrowserWindow::_init = ->
|
||||||
@setMenu menu if menu?
|
@setMenu menu if menu?
|
||||||
|
|
||||||
@webContents = @getWebContents()
|
@webContents = @getWebContents()
|
||||||
|
@webContents.once 'destroyed', => @webContents = null
|
||||||
|
|
||||||
# Define getter for devToolsWebContents.
|
# Define getter for devToolsWebContents.
|
||||||
devToolsWebContents = null
|
devToolsWebContents = null
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue