From 2ac75262dbf4a36fa2d0ba5925570c6248a32f5e Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Mon, 25 Oct 2021 22:36:12 +0300 Subject: [PATCH] minor fixes --- 2-ui/5-loading/01-onload-ondomcontentloaded/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-ui/5-loading/01-onload-ondomcontentloaded/article.md b/2-ui/5-loading/01-onload-ondomcontentloaded/article.md index 2351a90c..ac421120 100644 --- a/2-ui/5-loading/01-onload-ondomcontentloaded/article.md +++ b/2-ui/5-loading/01-onload-ondomcontentloaded/article.md @@ -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: ```js run 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?"; }); ```