This commit is contained in:
Ilya Kantor 2017-12-21 00:03:40 +03:00
parent c1e4507c8e
commit 9101dbac1f

View file

@ -130,7 +130,7 @@ For that we should use another event -- `onbeforeunload`.
If a visitor initiated navigation away from the page or tries to close the window, the `beforeunload` handler asks for additional confirmation.
It may return a string with the question. Historically browsers used to show it, but as of now only some of them do. That's because certain webmasters abused this event handler, to protect the visitor from potentially misleading and hackish messages.
It may return a string with the question. Historically browsers used to show it, but as of now only some of them do. That's because certain webmasters abused this event handler by showing misleading and hackish messages.
You can try it by running this code and then reloading the page.