A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/NodeIterator/whatToShow below:

whatToShow ยท WebPlatform Docs

whatToShow Summary

The NodeIterator.whatToShow read-only property represents an unsigned integer representing a bitmask signifying what types of nodes should be returned by the NodeIterator.

Property of dom/NodeIteratordom/NodeIterator

Syntax

Note: This property is read-only.

var nodeTypes = element.whatToShow;
Return Value

Returns an object of type unsigned longunsigned long

The type of accepted nodes.p is a bitwise OR of the following values:

NodeFilter.SHOW_ALL (0xFFFFFFFF) Show all nodes.

NodeFilter.SHOW_ELEMENT (0x00000001) Show Element nodes.

NodeFilter.SHOW_ATTRIBUTE (0x00000002) show Attribute nodes.

NodeFilter.SHOW_TEXT (0x00000004) Show Text nodes.

NodeFilter.SHOW_CDATA_SECTION (0x00000008) Show CDATASection nodes.

NodeFilter.SHOW_ENTITY_REFERENCE (0x00000010) Show EntityReference nodes.

NodeFilter.SHOW_ENTITY (0x00000020) Show Entity nodes.

NodeFilter.SHOW_PROCESSING_INSTRUCTION (0x00000040) Show ProcessingInstruction nodes.

NodeFilter.SHOW_COMMENT (0x00000080) Show Comment nodes.

NodeFilter.SHOW_DOCUMENT (0x00000100) Show Document nodes.

NodeFilter.SHOW_DOCUMENT_TYPE (0x00000200) Show DocumentType nodes.

NodeFilter.SHOW_DOCUMENT_FRAGMENT (0x00000400) Show DocumentFragment nodes.

NodeFilter.SHOW_NOTATION (0x00000800) Show Notation nodes.

Examples
var nodeIterator = document.createNodeIterator(
    document.body,
    NodeFilter.SHOW_ELEMENT + NodeFilter.SHOW_COMMENT + NodeFilter.SHOW_TEXT,
    { acceptNode: function(node) { return NodeFilter.FILTER_ACCEPT; } },
    false
);
if( (nodeIterator.whatToShow == NodeFilter.SHOW_ALL)
Notes Remarks

Filtering is based both on the whatToShow flags and the filter function.

Syntax

var nodeTypes = nodeIterator.whatToShow;

Standards information Related specifications
DOM
Living Standard
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4