cypress icon indicating copy to clipboard operation
cypress copied to clipboard

Deprecate `window:unload`

Open cacieprins opened this issue 9 months ago • 0 comments

What would you like?

I would like to be warned, either on stdout or in the command log, when I add listeners to the window:unload Cypress event.

Why is this needed?

The window unload event is being removed from Chrome. As a stopgap, Cypress is emitting window:unload when pagehide is emitted: #29525. To keep Cypress' API aligned with the w3 spec, we should be emitting a window:pagehide event instead. To notify users that this event is being deprecated in a future major version of Cypress, we should include warnings in the command log and/or stdout.

Other

No response

cacieprins avatar May 15 '24 18:05 cacieprins