dom.pattern.FullTag Extends goog.dom.pattern.StartTag
Pattern object that matches a full tag including all its children.

Inheritance

Constructor

goog.dom.pattern.FullTag(tagopt_attrsopt_stylesopt_test)

Parameters

tag : string | RegExp
Name of the tag. Also will accept a regular expression to match against the tag name.
opt_attrs : Object=
Optional map of attribute names to desired values. This pattern will only match when all attributes are present and match the string or regular expression value provided here.
opt_styles : Object=
Optional map of CSS style names to desired values. This pattern will only match when all styles are present and match the string or regular expression value provided here.
opt_test : Function=
Optional function that takes the element as a parameter and returns true if this pattern should match it.

Instance Methods

Public Protected Private
matchToken(tokentype) goog.dom.pattern.MatchType
Test whether the given token is a start tag token which matches the tag name, style, and attributes provided in the constructor.
Arguments:
token : Node
Token to match against.
type : goog.dom.TagWalkType
The type of token.
Returns: goog.dom.pattern.MatchType  MATCH at the end of our tag, MATCHING if we are within the tag, and NO_MATCH if the starting tag does not match.
code »
matchToken(tokentype) goog.dom.pattern.MatchType
Test whether the given token is a tag token which matches the tag name, style, and attributes provided in the constructor.
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, NO_MATCH otherwise.
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

constructor :
No description.
Code »
depth_ :
Tracks the matcher's depth to detect the end of the tag.
Code »
constructor :
No description.
Code »
attrs_ :
The attributes to test for.
Code »
constructor :
No description.
Code »
styles_ :
The styles to test for.
Code »
tag_ :
The tag to match.
Code »
test_ :
Function that takes the element as a parameter and returns true if this pattern should match it.
Code »
type_ :
The type of token to match.
Code »
matchedNode :
The first node matched by this pattern.
Code »

Static Properties

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

Package dom.pattern

Package Reference