New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add webContents.close() #35509
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API LGTM
API LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API LGTM
Release Notes Persisted
|
|
@PascalPixel please open a new issue with a repro, thanks! |
* feat: add webContents.close() * update docs, add test for beforeunload override * Update web-contents.md
Description of Change
Adds
webContents.close()
, which has roughly the same effect as the pagecalling
window.close()
. Closes #26929.There was some discussion in #26929 about having a WebContents be reusable
after close, but after studying the //content API for a while, I'm not sure
that's reasonable to implement, since content::WebContents is only closable by
destroying it.
Checklist
npm test
passesRelease Notes
Notes: Added
webContents.close()
method.