minor fixes

This commit is contained in:
Ilya Kantor 2021-10-25 22:36:12 +03:00
parent 6be354d049
commit 2ac75262db

View file

@ -199,7 +199,7 @@ window.addEventListener("beforeunload", (event) => {
Instead, in such handlers one should set `event.returnValue` to a string to get the result similar to the code above: Instead, in such handlers one should set `event.returnValue` to a string to get the result similar to the code above:
```js run ```js run
window.addEventListener("beforeunload", (event) => { window.addEventListener("beforeunload", (event) => {
// same as returning from window.onbeforeunload // works, same as returning from window.onbeforeunload
event.returnValue = "There are unsaved changes. Leave now?"; event.returnValue = "There are unsaved changes. Leave now?";
}); });
``` ```