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:
Jeremy Rose 2022-09-16 16:22:59 -07:00 committed by GitHub
parent 994834d25a
commit eebf34cc6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 110 additions and 1 deletions

View file

@ -152,6 +152,7 @@ class WebContents : public ExclusiveAccessContext,
const char* GetTypeName() override;
void Destroy();
void Close(absl::optional<gin_helper::Dictionary> options);
base::WeakPtr<WebContents> GetWeakPtr() { return weak_factory_.GetWeakPtr(); }
bool GetBackgroundThrottling() const;