From 1386fed7d38652d5848d315927e7e23a66cffd13 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 20 Oct 2021 13:28:52 +0300 Subject: [RU] Remove `name` attribute from headings (#2788) --- files/ru/web/api/document/evaluate/index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'files/ru/web/api/document/evaluate') diff --git a/files/ru/web/api/document/evaluate/index.html b/files/ru/web/api/document/evaluate/index.html index 11f6cbd372..d2839a3bc1 100644 --- a/files/ru/web/api/document/evaluate/index.html +++ b/files/ru/web/api/document/evaluate/index.html @@ -7,7 +7,7 @@ translation_of: Web/API/Document/evaluate

Возвращает экземпляр объекта типа XPathResult исходя из данного XPath и других входных параметров.

-

Синтаксис

+

Синтаксис

var xpathResult = document.evaluate(
  xpathExpression,
@@ -25,7 +25,7 @@ translation_of: Web/API/Document/evaluate
  
  • result - экземпляр объекта типа XPathResult, используемого для хранения результатов поиска по данному xpathExpression. Может принимать значение null
  • -

    Пример

    +

    Пример

    var headings = document.evaluate("/html/body//h2", document, null, XPathResult.ANY_TYPE, null);
     /* Найти в документе все элементы h2
    @@ -50,14 +50,14 @@ alert(alertText); // Показывает alert со всеми найденны
     
     

    Более детально данный материал описан в статье Introduction to using XPath in JavaScript.

    -

    Примечания

    +

    Примечания

    • Выражения XPath могут быть интерпретированы в HTML- и XML-документах.
    • While using document.evaluate() works in FF2, in FF3 one must use someXMLDoc.evaluate() if evaluating against something other than the current document.
    -

    Типы возвращаемых данных

    +

    Типы возвращаемых данных

    (Merge with Template:XPathResultConstants?

    @@ -127,7 +127,7 @@ alert(alertText); // Показывает alert со всеми найденны

    Results of NODE_SNAPSHOT types are snapshots, which are essentially lists of matched nodes. You can make changes to the document by altering snapshot nodes. Modifying the document doesn't invalidate the snapshot; however, if the document is changed, the snapshot may not correspond to the current state of the document, since nodes may have moved, been changed, added, or removed.

    -

    Спецификации

    +

    Спецификации

    @@ -146,11 +146,11 @@ alert(alertText); // Показывает alert со всеми найденны
    -

    Совместимость с браузерами

    +

    Совместимость с браузерами

    {{Compat("api.Document.evaluate")}}

    -

    Смотрите также

    +

    Смотрите также