From 09906949c2c50743c85227c643a48d84cb88a360 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 7 Oct 2020 13:27:23 -0700 Subject: [PATCH] docs(page): clarify page.close({runBeforeUnload: true}) behavior (#4086) --- docs/api.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/api.md b/docs/api.md index d39c9c053f..a02c5ca7aa 100644 --- a/docs/api.md +++ b/docs/api.md @@ -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