sincecutoff.com
← all changes

Playwright emits dialogclosed events

Introduced 2026-09-04 · score 0.95

HOW TO USE IT

When a JavaScript dialog is accepted, dismissed, or closed by the user, listen for `dialogclosed` on the page or its browser context to receive the `Dialog` event data.

page.on('dialogclosed', data => {});
browserContext.on('dialogclosed', data => {});

WHY THIS HELPS

Observe when a JavaScript dialog is accepted, dismissed, or closed by the user during a browser test.

REQUIREMENTS AND LIMITATIONS

  • Version: v1.63.0
  • event name: `dialogclosed` (required): Registers a listener for when a JavaScript dialog is closed.
  • `data` listener argument (required): The `Dialog` event data.
  • listener target: `page` or `browserContext` (required): A page listener covers that page; a context listener covers any page belonging to that context. The choices are alternatives.
  • Prerequisite: Added in Playwright v1.63.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card