1
1
mirror of https://github.com/microsoft/playwright.git synced 2024-12-15 06:02:57 +03:00
playwright/test/assets/beforeunload.html
2019-11-19 10:58:15 -08:00

11 lines
198 B
HTML

<div>beforeunload demo.</div>
<script>
window.addEventListener('beforeunload', event => {
// Chrome way.
event.returnValue = 'Leave?';
// Firefox way.
event.preventDefault();
});
</script>