Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

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

Yury Semikhatsky09906949c2c5
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