docs(page): clarify page.close({runBeforeUnload: true}) behavior (#4086)

This commit is contained in:
Yury Semikhatsky 2020-10-07 13:27:23 -07:00 committed by GitHub
parent 6bb212ceed
commit 09906949c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1107,6 +1107,8 @@ Shortcut for [page.mainFrame().click(selector[, options])](#frameclickselector-o
page handlers.
- returns: <[Promise]>
If `runBeforeUnload` is `false` the result will resolve only after the page has been closed.
If `runBeforeUnload` is `true` the method will **not** wait for the page to close.
By default, `page.close()` **does not** run beforeunload handlers.
> **NOTE** if `runBeforeUnload` is passed as true, a `beforeunload` dialog might be summoned