NodeIterator.expandEntityReferences

  • Revision slug: Web/API/NodeIterator.expandEntityReferences
  • Revision title: NodeIterator.expandEntityReferences
  • Revision id: 471375
  • Created:
  • Creator: Khodaidad_Basharmand
  • Is current revision? Yes
  • Comment

Revision Content

{{ DomRef("NodeIterator") }}{{deprecated_header}}

The NodeIterator.expandEntityReferences read-only property returns a {{domxref("Boolean")}} flag indicating whether or not the children of entity reference nodes are visible to the {{domxref("NodeIterator")}}.

If this value is false, the children of entity reference nodes (as well as all of their descendants) are rejected. This takes precedence over the value of the  {{domxref("NodeIterator.whatToShow")}} method and the associated filter.

Syntax

expand = nodeIterator.expandEntityReferences;

Example

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

Specifications

Specification Status Comment
{{SpecName('DOM WHATWG', '#nodeiterator', 'NodeIterator')}} {{Spec2('DOM WHATWG')}} Removed from the spec.
{{SpecName('DOM2 Traversal_Range', 'traversal.html#Traversal-NodeIterator-expandEntityReferences', 'NodeIterator.expandEntityReferences')}} {{Spec2('DOM2 Traversal_Range')}} Initial definition.

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 {{CompatGeckoDesktop("1.9.1")}}
Removed in {{CompatGeckoDesktop("21")}}
9.0 9.0 3.0
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}} {{CompatGeckoMobile("1.9.1")}}
Removed in {{CompatGeckoMobile("21")}}
{{CompatVersionUnknown}} 9.0 3.0

See also

  • The interface this property belongs to: {{domxref("NodeIterator")}}.

Revision Source

<p>{{ DomRef("NodeIterator") }}{{deprecated_header}}</p>
<p>The <code><strong>NodeIterator.expandEntityReferences</strong></code> read-only property returns a {{domxref("Boolean")}} flag indicating whether or not the children of entity reference nodes are visible to the {{domxref("NodeIterator")}}.</p>
<p>If this value is <code>false</code>, the children of entity reference nodes (as well as all of their descendants) are rejected. This takes precedence over the value of the&nbsp; {{domxref("NodeIterator.whatToShow")}} method and the associated filter.</p>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="syntaxbox">
<em>expand</em> = <em>nodeIterator</em>.expandEntityReferences;
</pre>
<h2 id="Example" name="Example">Example</h2>
<pre class="brush: js">
var nodeIterator = document.createNodeIterator(
    document.body,
    NodeFilter.SHOW_ELEMENT,
    { acceptNode: function(node) { return NodeFilter.FILTER_ACCEPT; } },
    false
);
expand = nodeIterator.expandEntityReferences;</pre>
<h2 id="Specification" name="Specification">Specifications</h2>
<table class="standard-table">
  <tbody>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
    <tr>
      <td>{{SpecName('DOM WHATWG', '#nodeiterator', 'NodeIterator')}}</td>
      <td>{{Spec2('DOM WHATWG')}}</td>
      <td>Removed from the spec.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM2 Traversal_Range', 'traversal.html#Traversal-NodeIterator-expandEntityReferences', 'NodeIterator.expandEntityReferences')}}</td>
      <td>{{Spec2('DOM2 Traversal_Range')}}</td>
      <td>Initial definition.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{CompatibilityTable}}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>1.0</td>
        <td>{{CompatGeckoDesktop("1.9.1")}}<br />
          Removed in {{CompatGeckoDesktop("21")}}</td>
        <td>9.0</td>
        <td>9.0</td>
        <td>3.0</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Mobile</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatGeckoMobile("1.9.1")}}<br />
          Removed in {{CompatGeckoMobile("21")}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>9.0</td>
        <td>3.0</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li>The interface this property belongs to: {{domxref("NodeIterator")}}.</li>
</ul>
Revert to this revision