minor fixes
This commit is contained in:
parent
6be354d049
commit
2ac75262db
1 changed files with 1 additions and 1 deletions
|
@ -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?";
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue