NodeIterator.referenceNode

  • Revision slug: DOM/NodeIterator.referenceNode
  • Revision title: NodeIterator.referenceNode
  • Revision id: 136546
  • Created:
  • Creator: Jürgen Jeka
  • Is current revision? No
  • Comment 4 words added, 4 words removed

Revision Content

{{ DomRef() }}

{{ gecko_minversion_header("1.9.1") }}

{{ non-standard_header() }}

Summary

Returns the node to which the iterator is anchored; as new nodes are inserted, the iterator remains anchored to the reference node as specified by this property.

Syntax

node = nodeIterator.referenceNode;

Notes

This property was introduced by WebKit and is used for testing; it can also be used by debuggers.  It is not part of the DOM specification.

Example

var nodeIterator = document.createNodeIterator(
    document.body,
    NodeFilter.SHOW_ELEMENT,
    { acceptNode: function(node) { return NodeFilter.FILTER_ACCEPT; } },
    false
);
node = nodeIterator.referenceNode;

 

Revision Source

<p>{{ DomRef() }}</p>
<p>{{ gecko_minversion_header("1.9.1") }}</p>
<p>{{ non-standard_header() }}</p>
<h3 id="Summary" name="Summary">Summary</h3>
<p>Returns the node to which the iterator is anchored; as new nodes are inserted, the iterator remains anchored to the reference node as specified by this property.</p>
<h3 id="Syntax" name="Syntax">Syntax</h3>
<pre class="eval">node = nodeIterator.referenceNode;
</pre>
<h3 id="Notes">Notes</h3>
<p>This property was introduced by WebKit and is used for testing; it can also be used by debuggers.  It is not part of the DOM specification.</p>
<h3 id="Example" name="Example">Example</h3>
<pre class="eval">var nodeIterator = document.createNodeIterator(
    document.body,
    NodeFilter.SHOW_ELEMENT,
    { acceptNode: function(node) { return NodeFilter.FILTER_ACCEPT; } },
    false
);
node = nodeIterator.referenceNode;
</pre>
<p> </p>
Revert to this revision