123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- goog.provide('goog.dom.pattern');
- goog.provide('goog.dom.pattern.MatchType');
- goog.dom.pattern.matchStringOrRegex = function(obj, str) {
- if (goog.isString(obj)) {
-
- return str == obj;
- } else {
-
- return !!(str && str.match(obj));
- }
- };
- goog.dom.pattern.matchStringOrRegexMap = function(elem, index, orig) {
- return goog.dom.pattern.matchStringOrRegex(
- elem, index in this ?
- this[index] :
- (this.getAttribute ? this.getAttribute(index) : null));
- };
- goog.dom.pattern.MatchType = {
- NO_MATCH: 0,
- MATCHING: 1,
- MATCH: 2,
- BACKTRACK_MATCH: 3
- };
|