feat: add webContents.close() (#35509)
* feat: add webContents.close() * update docs, add test for beforeunload override * Update web-contents.md
This commit is contained in:
parent
994834d25a
commit
eebf34cc6c
5 changed files with 110 additions and 1 deletions
|
@ -134,6 +134,7 @@ BrowserWindow::~BrowserWindow() {
|
|||
api_web_contents_->RemoveObserver(this);
|
||||
// Destroy the WebContents.
|
||||
OnCloseContents();
|
||||
api_web_contents_->Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -181,7 +182,6 @@ void BrowserWindow::WebContentsDestroyed() {
|
|||
|
||||
void BrowserWindow::OnCloseContents() {
|
||||
BaseWindow::ResetBrowserViews();
|
||||
api_web_contents_->Destroy();
|
||||
}
|
||||
|
||||
void BrowserWindow::OnRendererResponsive(content::RenderProcessHost*) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue