W3cubDocs

/Web APIs

TreeWalker.expandEntityReferences

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The TreeWalker.expandEntityReferences read-only property returns a boolean flag indicating whether or not the children of entity reference nodes are visible to the TreeWalker.

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 TreeWalker.whatToShow method and the associated filter.

Syntax

expand = treeWalker.expandEntityReferences;

Example

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

Specifications

This method was originally a part of DOM Level 2 Traversal and Range, but is absent in the current DOM specification. This feature is no longer on track to become a standard.

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
expandEntityReferences
1-41
12-79
4-21
9
9-28
3-10.1
3-41
18-41
4-21
10.1-28
3-10.3
1.0-4.0

See also

  • The interface this property belongs to: TreeWalker.

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker/expandEntityReferences