aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/api/history_api/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ru/web/api/history_api/index.html')
-rw-r--r--files/ru/web/api/history_api/index.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/files/ru/web/api/history_api/index.html b/files/ru/web/api/history_api/index.html
index ed100ee574..580c8c833b 100644
--- a/files/ru/web/api/history_api/index.html
+++ b/files/ru/web/api/history_api/index.html
@@ -19,13 +19,13 @@ translation_of: Web/API/History_API
<p>Чтобы переместиться назад по истории:</p>
-<pre class="brush: js notranslate">window.history.back();
+<pre class="brush: js">window.history.back();
</pre>
<p>Данный метод работает так, будто пользователь нажал на кнопку "Назад" на панели браузера.<br>
Похожим образом можно переместиться вперёд (как если бы пользователь нажал на кнопку "Вперёд"):</p>
-<pre class="brush: js notranslate">window.history.forward();
+<pre class="brush: js">window.history.forward();
</pre>
<h3 id="Перемещение_к_определённой_странице_в_истории">Перемещение к определённой странице в истории</h3>
@@ -34,25 +34,25 @@ translation_of: Web/API/History_API
<p>Вернуться на одну страницу назад (равноценно вызову {{DOMxRef("History.back","back()")}}):</p>
-<pre class="brush: js notranslate">window.history.go(-1);
+<pre class="brush: js">window.history.go(-1);
</pre>
<p>Перейти на одну страницу вперёд (равноценно вызову {{DOMxRef("History.forward","forward()")}})</p>
-<pre class="brush: js notranslate">window.history.go(1);
+<pre class="brush: js">window.history.go(1);
</pre>
<p>По такому же принципу, можно перемещаться вперёд на 2 страницы, передавая аргумент <code>2</code>, и так далее.</p>
<p>Кроме того, метод <code>go()</code> можно использовать для обновления текущей страницы, передавая аргумент <code>0</code> или вызывая его без аргументов:</p>
-<pre class="notranslate">// Обе следующих инструкции обновляют текущую страницу
+<pre>// Обе следующих инструкции обновляют текущую страницу
window.history.go(0)
window.history.go()</pre>
<p>Узнать количество страниц, которые находятся в стеке истории, можно, получив значение свойства <code>length</code>:</p>
-<pre class="brush: js notranslate">var numberOfEntries = window.history.length;
+<pre class="brush: js">var numberOfEntries = window.history.length;
</pre>
<h2 id="Интерфейсы">Интерфейсы</h2>
@@ -66,7 +66,7 @@ window.history.go()</pre>
<p>В следующем примере свойству <code>onpopstate</code> назначается обработчик. А затем приводятся некоторые методы объекта истории для добавления, замени и перемещения по истории текущей вкладки браузера</p>
-<pre class="notranslate">window.onpopstate = function(event) {
+<pre>window.onpopstate = function(event) {
alert(`location: ${document.location}, state: ${JSON.stringify(event.state)}`)
}