From 980fe00a74a9ad013b945755415ace2e5429c3c2 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 27 Oct 2021 02:31:24 +0300 Subject: [RU] Remove notranslate (#2874) --- files/ru/web/api/response/index.html | 6 +++--- files/ru/web/api/response/response/index.html | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'files/ru/web/api/response') diff --git a/files/ru/web/api/response/index.html b/files/ru/web/api/response/index.html index e32d4d23b9..969c6d288f 100644 --- a/files/ru/web/api/response/index.html +++ b/files/ru/web/api/response/index.html @@ -93,7 +93,7 @@ translation_of: Web/API/Response

You'll notice that since we are requesting an image, we need to run {{domxref("Body.blob")}} ({{domxref("Response")}} implements Body) to give the response its correct MIME type.

-
const image = document.querySelector('.my-image');
+
const image = document.querySelector('.my-image');
 fetch('flowers.jpg').then(function(response) {
   return response.blob();
 }).then(function(blob) {
@@ -103,13 +103,13 @@ fetch('flowers.jpg').then(function(response) {
 
 

You can also use the {{domxref("Response.Response()")}} constructor to create your own custom Response object:

-
const response = new Response();
+
const response = new Response();

Ajax запрос

Здесь мы с помощью функции doAjax вызываем PHP скрипт, который генерирует JSON строку, и возвращает распарсенный JSON в виде JavaScript объекта. Также реализована простая обработка ошибок.

-
// Функция, которая делает Ajax запрос
+
// Функция, которая делает Ajax запрос
 const doAjax = async () => {
     const response = await fetch('Ajax.php'); // Генерируем объект Response
     if (response.ok) {
diff --git a/files/ru/web/api/response/response/index.html b/files/ru/web/api/response/response/index.html
index 033d5fd08b..4f5c98692b 100644
--- a/files/ru/web/api/response/response/index.html
+++ b/files/ru/web/api/response/response/index.html
@@ -15,7 +15,7 @@ translation_of: Web/API/Response/Response
 
 

Синтаксис

-
var myResponse = new Response(body, init);
+
var myResponse = new Response(body, init);

Параметры

@@ -45,7 +45,7 @@ translation_of: Web/API/Response/Response

In our Fetch Response example (see Fetch Response live) we create a new Response object using the constructor, passing it a new {{domxref("Blob")}} as a body, and an init object containing a custom status and statusText:

-
var myBlob = new Blob();
+
var myBlob = new Blob();
 var init = { "status" : 200 , "statusText" : "SuperSmashingGreat!" };
 var myResponse = new Response(myBlob,init);
-- cgit v1.2.3-54-g00ecf