DIV, SPAN
the matcher will not match
DIV, DIV, SPAN
because it starts matching at the first
DIV
, fails to match SPAN
at the second, and never
backtracks to try again.
It is also possible to have a set of complex patterns that when matched in
parallel will miss some possible matches. Running multiple times will catch
all matches eventually.
goog.dom.pattern.Matcher |
![]()
Adds a pattern to be matched. The callback can return an object whose keys
are processing instructions.
Arguments:
|
code » | |||
![]()
Match the set of patterns against a match tree.
Arguments:
|
code » | |||
Test the given node against all patterns.
Arguments:
Returns: boolean
Whether a pattern modified the position or tree
and its callback resulted in DOM structure or position modification.
|
code » | |||
![]()
Resets all the patterns.
|
code » |