Skip to content
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

docs: add Page.onceDialog for java #5706

Merged
merged 4 commits into from
Mar 3, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/src/api/class-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,20 @@ The page's main frame. Page is guaranteed to have a main frame which persists du
## property: Page.mouse
- type: <[Mouse]>

## method: Page.onceDialog
yury-s marked this conversation as resolved.
Show resolved Hide resolved
* langs: java

Adds one-off [Dialog] handler. The handler will be removed immediately after next [Dialog] is created.
yury-s marked this conversation as resolved.
Show resolved Hide resolved

### param: Page.onceDialog.handler =
- `handler` <[function]\([Dialog]\):[void]>

Receives the [Dialog] object, it **must** either [`method: Dialog.accept`] or [`method: Dialog.dismiss`] the dialog - otherwise
the page will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the dialog,
and actions like click will never finish.

### option: Page.waitForDownload.timeout = %%-wait-for-event-timeout-%%

## async method: Page.opener
- returns: <[null]|[Page]>

Expand Down