The goog.dom.pattern.Sequence Class

goog.dom.pattern.Sequence
> goog.dom.pattern.AbstractPattern

goog.dom.pattern.Sequence(patterns, opt_ignoreWhitespace)

Pattern object that matches a sequence of other patterns.

patterns {Array.<goog.dom.pattern.AbstractPattern>}
Ordered array of patterns to match.
opt_ignoreWhitespace {boolean=}
Optional flag to ignore text nodes consisting entirely of whitespace. The default is to not ignore them.

.matchToken(token, type)

Test whether the given token starts, continues, or finishes the sequence of patterns given in the constructor.

token {Node}
Token to match against.
type {goog.dom.TagWalkType}
The type of token.
returns {goog.dom.pattern.MatchType}
MATCH if the pattern matches, MATCHING if the pattern starts a match, and NO_MATCH if the pattern does not match.

.matchedNode {Node}

Inherited from goog.dom.pattern.AbstractPattern .

The first node matched by this pattern.

.patterns {Array.<goog.dom.pattern.AbstractPattern>}

Ordered array of patterns to match.

.reset()

Reset any internal state this pattern keeps.