From e77e4f5f91a479107c1b3920ddfd80d8e6078ce7 Mon Sep 17 00:00:00 2001 From: Bekish Nikita Date: Mon, 12 Jul 2021 23:46:00 +0300 Subject: [PATCH 1/3] few changes for async/ch1 --- async & performance/ch1.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/async & performance/ch1.md b/async & performance/ch1.md index 71dc7db..909f5b0 100644 --- a/async & performance/ch1.md +++ b/async & performance/ch1.md @@ -45,7 +45,9 @@ ajax( "http://some.url.1", function myCallbackFunction(data){ } ); ``` -**Warning:** You may have heard that it's possible to make synchronous Ajax requests. While that's technically true, you should never, ever do it, under any circumstances, because it locks the browser UI (buttons, menus, scrolling, etc.) and prevents any user interaction whatsoever. This is a terrible idea, and should always be avoided. + + +**Warning:** Вы могли слышать, что является возможным выполнять синхронные Ajax вызовы. While that's technically true, you should never, ever do it, under any circumstances, because it locks the browser UI (buttons, menus, scrolling, etc.) and prevents any user interaction whatsoever. This is a terrible idea, and should always be avoided. Before you protest in disagreement, no, your desire to avoid the mess of callbacks is *not* justification for blocking, synchronous Ajax. From 856015bca7ca698cdfa974727a6ca68f155bd301 Mon Sep 17 00:00:00 2001 From: Bekish Nikita Date: Mon, 12 Jul 2021 23:51:06 +0300 Subject: [PATCH 2/3] asyncPerfomance/ch1 --- async & performance/ch1.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/async & performance/ch1.md b/async & performance/ch1.md index 909f5b0..a458fc6 100644 --- a/async & performance/ch1.md +++ b/async & performance/ch1.md @@ -45,9 +45,7 @@ ajax( "http://some.url.1", function myCallbackFunction(data){ } ); ``` - - -**Warning:** Вы могли слышать, что является возможным выполнять синхронные Ajax вызовы. While that's technically true, you should never, ever do it, under any circumstances, because it locks the browser UI (buttons, menus, scrolling, etc.) and prevents any user interaction whatsoever. This is a terrible idea, and should always be avoided. +**Предупреждение:** Вы могли слышать, что является возможным выполнять синхронные Ajax вызовы. Хотя, технически это верно, вы никогда и ни при каких обстоятельствах не должны этого делать, т.к. это блокирует пользовательский интерфейс браузера (кнопки, меню, скроллы, и т.д.) и предотвращает любое взаимодействие с пользователем. Это ужасная идея, и ее всегда следует избегать. Before you protest in disagreement, no, your desire to avoid the mess of callbacks is *not* justification for blocking, synchronous Ajax. From 1e7363d4b2174f67bacf3ff0ccb084b171adbc32 Mon Sep 17 00:00:00 2001 From: Bekish Nikita Date: Mon, 12 Jul 2021 23:53:13 +0300 Subject: [PATCH 3/3] check --- async & performance/ch1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/async & performance/ch1.md b/async & performance/ch1.md index a458fc6..8479d79 100644 --- a/async & performance/ch1.md +++ b/async & performance/ch1.md @@ -51,6 +51,7 @@ Before you protest in disagreement, no, your desire to avoid the mess of callbac For example, consider this code: + ```js function now() { return 21;