The goog.dom.pattern.callback Namespace

The goog.dom.pattern.callback.Counter Class

Callback class for counting matches. … more

The goog.dom.pattern.callback.Test Class

Callback class for testing for at least one match. … more

.flattenElement(node, position)

Callback function for use in {@link goog.dom.pattern.Matcher.addPattern} that removes the matched node from the tree and replaces it with its children. Should be used in conjunction with a {@link goog.dom.pattern.StartTag} pattern.

node {Element}
The node matched by the pattern.
position {goog.dom.TagIterator}
The position where the match finished.
returns {boolean}
Returns true to indicate tree changes were made.

.removeNode(node, position)

Callback function for use in {@link goog.dom.pattern.Matcher.addPattern} that removes the matched node from the tree. Should be used in conjunciton with a {@link goog.dom.pattern.StartTag} pattern.

node {Node}
The node matched by the pattern.
position {goog.dom.TagIterator}
The position where the match finished.
returns {boolean}
Returns true to indicate tree changes were made.