beforeunload()
Accept or dismiss a beforeunload popup.
Examples
Section titled “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
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
callback | function | Action to perform. Accept/Dismiss. |
Returns
Section titled “Returns”This API does not return any values.