beforeunload
Accept or dismiss a
beforeunload
popup.
Examples
beforeunload(async () => await accept())
beforeunload(async () => await dismiss())
// Note: Taiko's `beforeunload` listener can be setup anywhere in the
// script. The listener will run when the popup displays on the page.
Parameters
-
callback
-
Action to perform. Accept/Dismiss.
Returns
This API does not return any values