cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.

Home Page:https://cypress.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecate `window:unload`

cacieprins opened this issue · 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