Skip to content

Commit 0990694

Browse files
authored
docs(page): clarify page.close({runBeforeUnload: true}) behavior (#4086)
1 parent 6bb212c commit 0990694

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,8 @@ Shortcut for [page.mainFrame().click(selector[, options])](#frameclickselector-o
11071107
page handlers.
11081108
- returns: <[Promise]>
11091109

1110+
If `runBeforeUnload` is `false` the result will resolve only after the page has been closed.
1111+
If `runBeforeUnload` is `true` the method will **not** wait for the page to close.
11101112
By default, `page.close()` **does not** run beforeunload handlers.
11111113

11121114
> **NOTE** if `runBeforeUnload` is passed as true, a `beforeunload` dialog might be summoned

0 commit comments

Comments
 (0)