Dart API Referencedart:htmlNodeFilter

NodeFilter class

@DocsEditable
@DomName('NodeFilter')
class NodeFilter native "NodeFilter" {

 @DomName('NodeFilter.FILTER_ACCEPT')
 @DocsEditable
 static const int FILTER_ACCEPT = 1;

 @DomName('NodeFilter.FILTER_REJECT')
 @DocsEditable
 static const int FILTER_REJECT = 2;

 @DomName('NodeFilter.FILTER_SKIP')
 @DocsEditable
 static const int FILTER_SKIP = 3;

 @DomName('NodeFilter.SHOW_ALL')
 @DocsEditable
 static const int SHOW_ALL = 0xFFFFFFFF;

 @DomName('NodeFilter.SHOW_ATTRIBUTE')
 @DocsEditable
 static const int SHOW_ATTRIBUTE = 0x00000002;

 @DomName('NodeFilter.SHOW_CDATA_SECTION')
 @DocsEditable
 static const int SHOW_CDATA_SECTION = 0x00000008;

 @DomName('NodeFilter.SHOW_COMMENT')
 @DocsEditable
 static const int SHOW_COMMENT = 0x00000080;

 @DomName('NodeFilter.SHOW_DOCUMENT')
 @DocsEditable
 static const int SHOW_DOCUMENT = 0x00000100;

 @DomName('NodeFilter.SHOW_DOCUMENT_FRAGMENT')
 @DocsEditable
 static const int SHOW_DOCUMENT_FRAGMENT = 0x00000400;

 @DomName('NodeFilter.SHOW_DOCUMENT_TYPE')
 @DocsEditable
 static const int SHOW_DOCUMENT_TYPE = 0x00000200;

 @DomName('NodeFilter.SHOW_ELEMENT')
 @DocsEditable
 static const int SHOW_ELEMENT = 0x00000001;

 @DomName('NodeFilter.SHOW_ENTITY')
 @DocsEditable
 static const int SHOW_ENTITY = 0x00000020;

 @DomName('NodeFilter.SHOW_ENTITY_REFERENCE')
 @DocsEditable
 static const int SHOW_ENTITY_REFERENCE = 0x00000010;

 @DomName('NodeFilter.SHOW_NOTATION')
 @DocsEditable
 static const int SHOW_NOTATION = 0x00000800;

 @DomName('NodeFilter.SHOW_PROCESSING_INSTRUCTION')
 @DocsEditable
 static const int SHOW_PROCESSING_INSTRUCTION = 0x00000040;

 @DomName('NodeFilter.SHOW_TEXT')
 @DocsEditable
 static const int SHOW_TEXT = 0x00000004;
}

Extends

Interceptor > NodeFilter

Static Properties

const int FILTER_ACCEPT #

Value returned by the NodeFilter.acceptNode() method when a node should be accepted.
static const int FILTER_ACCEPT = 1

const int FILTER_REJECT #

Value to be returned by the NodeFilter.acceptNode() method when a node should be rejected. The children of rejected nodes are not visited by the NodeIterator or TreeWalker object; this value is treated as "skip this node and all its children".
static const int FILTER_REJECT = 2

const int FILTER_SKIP #

Value to be returned by NodeFilter.acceptNode() for nodes to be skipped by the NodeIterator or TreeWalker object. The children of skipped nodes are still considered. This is treated as "skip this node but not its children".
static const int FILTER_SKIP = 3

const int SHOW_ALL #

Shows all nodes.
static const int SHOW_ALL = 0xFFFFFFFF

const int SHOW_ATTRIBUTE #

Shows attribute Attr nodes. This is meaningful only when creating a NodeIterator or TreeWalker with an Attr node as its root; in this case, it means that the attribute node will appear in the first position of the iteration or traversal. Since attributes are never children of other nodes, they do not appear when traversing over the document tree.
static const int SHOW_ATTRIBUTE = 0x00000002

const int SHOW_CDATA_SECTION #

Shows CDATASection  nodes.
static const int SHOW_CDATA_SECTION = 0x00000008

const int SHOW_COMMENT #

Shows Comment  nodes.
static const int SHOW_COMMENT = 0x00000080

const int SHOW_DOCUMENT #

Shows Document  nodes.
static const int SHOW_DOCUMENT = 0x00000100

const int SHOW_DOCUMENT_FRAGMENT #

Shows DocumentFragment  nodes.
static const int SHOW_DOCUMENT_FRAGMENT = 0x00000400

const int SHOW_DOCUMENT_TYPE #

Shows DocumentType  nodes.
static const int SHOW_DOCUMENT_TYPE = 0x00000200

const int SHOW_ELEMENT #

Shows Element  nodes.
static const int SHOW_ELEMENT = 0x00000001

const int SHOW_ENTITY #

Shows Entity  nodes. This is meaningful only when creating a NodeIterator or TreeWalker with an Entity node as its root; in this case, it means that the Entity node will appear in the first position of the traversal. Since entities are not part of the document tree, they do not appear when traversing over the document tree.
static const int SHOW_ENTITY = 0x00000020

const int SHOW_ENTITY_REFERENCE #

Shows EntityReference  nodes.
static const int SHOW_ENTITY_REFERENCE = 0x00000010

const int SHOW_NOTATION #

Shows Notation nodes. This is meaningful only when creating a NodeIterator or TreeWalker with a Notation node as its root; in this case, it means that the Notation node will appear in the first position of the traversal. Since entities are not part of the document tree, they do not appear when traversing over the document tree.
static const int SHOW_NOTATION = 0x00000800

const int SHOW_PROCESSING_INSTRUCTION #

static const int SHOW_PROCESSING_INSTRUCTION = 0x00000040

const int SHOW_TEXT #

Shows Text  nodes.
static const int SHOW_TEXT = 0x00000004

Properties

final int hashCode #

inherited from Interceptor

Get a hash code for this object.

All objects have hash codes. Hash codes are guaranteed to be the same for objects that are equal when compared using the equality operator ==. Other than that there are no guarantees about the hash codes. They will not be consistent between runs and there are no distribution guarantees.

If a subclass overrides hashCode it should override the equality operator as well to maintain consistency.

docs inherited from Object
int get hashCode => Primitives.objectHashCode(this);

final Type runtimeType #

inherited from Interceptor

A representation of the runtime type of the object.

docs inherited from Object
Type get runtimeType => getRuntimeType(this);

Operators

bool operator ==(other) #

inherited from Interceptor

The equality operator.

The default behavior for all Objects is to return true if and only if this and other are the same object.

If a subclass overrides the equality operator it should override the hashCode method as well to maintain consistency.

docs inherited from Object
bool operator ==(other) => identical(this, other);

Methods

dynamic noSuchMethod(Invocation invocation) #

inherited from Interceptor

noSuchMethod is invoked when users invoke a non-existant method on an object. The name of the method and the arguments of the invocation are passed to noSuchMethod in an Invocation. If noSuchMethod returns a value, that value becomes the result of the original invocation.

The default behavior of noSuchMethod is to throw a noSuchMethodError.

docs inherited from Object
dynamic noSuchMethod(Invocation invocation) {
 throw new NoSuchMethodError(
     this,
     _symbolToString(invocation.memberName),
     invocation.positionalArguments,
     _symbolMapToStringMap(invocation.namedArguments));
}

String toString() #

inherited from Interceptor

Returns a string representation of this object.

docs inherited from Object
String toString() => Primitives.objectToString(this);

This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.