dom.pattern.ChildMatches Extends goog.dom.pattern.AllChildren
Pattern object that matches any nodes at or below the current tree depth.

Inheritance

Constructor

goog.dom.pattern.ChildMatches(childPatternopt_minimumMatches)

Parameters

childPattern : goog.dom.pattern.AbstractPattern
Pattern to collect child matches of.
opt_minimumMatches : number=
Enforce a minimum nuber of matches. Defaults to 0.

Instance Methods

Public Protected Private
matchToken(tokentype) goog.dom.pattern.MatchType
Test whether the given token is on the same level.
Arguments:
token : Node
Token to match against.
type : goog.dom.TagWalkType
The type of token.
Returns: goog.dom.pattern.MatchType  MATCHING if the token is on the same level or deeper and BACKTRACK_MATCH if not.
code »
reset()
Reset any internal state this pattern keeps.
code »
matchToken(tokentype) goog.dom.pattern.MatchType
Test whether the given token is on the same level.
Arguments:
token : Node
Token to match against.
type : goog.dom.TagWalkType
The type of token.
Returns: goog.dom.pattern.MatchType  MATCHING if the token is on the same level or deeper and BACKTRACK_MATCH if not.
code »
reset()
Reset any internal state this pattern keeps.
code »
matchToken(tokentype) goog.dom.pattern.MatchType
Test whether this pattern matches the given token.
Arguments:
token : Node
Token to match against.
type : goog.dom.TagWalkType
The type of token.
Returns: goog.dom.pattern.MatchType  MATCH if the pattern matches.
code »
reset()
Reset any internal state this pattern keeps.
code »

Instance Properties

The child pattern to collect matches from.
Code »
constructor :
No description.
Code »
matches :
Array of matched child nodes.
Code »
minimumMatches_ :
Minimum number of matches.
Code »
needsReset_ :
Whether the pattern has recently matched or failed to match and will need to be reset when starting a new round of matches.
Code »
constructor :
No description.
Code »
depth_ :
Tracks the matcher's depth to detect the end of the tag.
Code »
matchedNode :
The first node matched by this pattern.
Code »

Static Properties

goog.dom.pattern.ChildMatches.superClass_ :
No description.
Code »

Package dom.pattern

Package Reference