Determines whether a DOM element has the given className.
@method hasClass
@for DOM
@param {HTMLElement} element The DOM element.
@param {String} className the class name to search for
@return {Boolean} Whether or not the element has the given class.
342434
function(node, className) {
        var re = Y.DOM._getRegExp('(?:^|\\s+)' + className + '(?:\\s+|$)');
        return re.test(node.className);
    }
1098066
public function hasClass($className)
    {
        if (!$class = $this->dom->getAttribute("class")) {
            return false;
        }

        $classes = explode(" ", $class);

        return in_array($className, $classes, true);
    }
871315
function hasClass(element, className) {
    !!/\s/.test(className) ? "development" !== 'production' ? invariant(false, 'CSS.hasClass takes only a single class name.') : invariant(false) : void 0;
    if (element.classList) {
      return !!className && element.classList.contains(className);
    }
    return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1;
  }
857838
Element getElement(String className) {
        int templateStart = className.indexOf('<');
        if (templateStart != -1) {
            className = className.substring(0, templateStart).trim();
        }
        return elementUtils.getTypeElement(className);
    }
1261659
public TypeElement findClass(Element element, String className) {
        TypeElement encl = getEnclosingTypeElement(element);
        TypeElement searchResult = configuration.workArounds.searchClass(encl, className);
        if (searchResult == null) {
            encl = getEnclosingTypeElement(encl);
            //Expand search space to include enclosing class.
            while (encl != null && getEnclosingTypeElement(encl) != null) {
                encl = getEnclosingTypeElement(encl);
            }
            searchResult = encl == null
                    ? null
                    : configuration.workArounds.searchClass(encl, className);
        }
        return searchResult;
    }
491272
private boolean hasSuperclass(Name es6Class) {
    Node decl = es6Class.getDeclaration().getNode();
    Node classNode = NodeUtil.getRValueOfLValue(decl);
    checkState(classNode.isClass(), classNode);
    Node superclass = classNode.getSecondChild();

    return !superclass.isEmpty();
  }
969143
public function hasClass($className)
    {
        if ($this->hasAttribute('class')) {
            return in_array($className, preg_split('/\s+/', $this->getAttribute('class')));
        }

        return false;
    }
21894
function removeClass(el, className) {
    if (!el || !className) {
      return;
    }
    el.className = el.className.replace(new RegExp('(?:^|\\s)' + className + '(?!\\S)'), '');
    return el;
  }
233626
function contains( element ) {
    for( var i = 0, len = lists.length; i < len; i++ ) {
      if( lists[i].element == element ) {
        return true;
      }
    }
    return false;
  }
414823
function addClass( element ) {
  const addClassNamesArray = _sliceArgs( arguments );
  if ( hasClassList ) {
    element.classList.add.apply( element.classList, addClassNamesArray );
  } else {
    var classes = element.className.split( ' ' );
    addClassNamesArray.forEach( function( name ) {
      if ( classes.indexOf( name ) === -1 ) {
        classes.push( name );
      }
    } );
    element.className = classes.join( ' ' );
  }

  return element;
}
1017247
function (element, className) {
		var elemClassName;
		while (element) {
			elemClassName = attr(element, 'class');
			if (elemClassName) {
				if (elemClassName.indexOf(className) !== -1) {
					return true;
				} else if (elemClassName.indexOf(PREFIX + 'container') !== -1) {
					return false;
				}
			}
			element = element.parentNode;
		}		
	}
98535
static boolean isElementParentName(Element element, String name) {
        Element parent = element.getParentElement();
        if (parent == null) {
            return false;
        }
        return isElementName(parent, name);
    }
914466
function(el, cls) {
      var elClass = el.className;
      var elClassList = elClass.split(/\s+/);
      var x = 0;
      for(x in elClassList) {
        if(elClassList[x] == cls) {
          return true;
        }
      }
      return false;
    }
39150
function (el) {
        return !isElement(el)
            || el.disabled
            || el.classList.contains('disabled')
            || Boolean(el.getAttribute('disabled'))
    }
206697
function (el, cls) {
        cls = getString(cls);
        if (!cls) return;
        if (Array.isArray(cls)) {
            cls.forEach(function(c) {
                dom.addClass(el, c);
            });
        } else if (el.classList) {
            el.classList.add(cls);
        } else {
            if (!hasClass(el, cls)) {
                if (el.classList) {
                    el.classList.add(cls);
                } else {
                    el.className += ' ' + cls;
                }
            }
        }
    }
311016
public function hasClass($className)
    {
        $ret = $this->doc()->hasClass($this, $className);
        if (!is_array($ret)) {
            return $ret;
        }

        if (count($this) < 2) {
            return reset($ret);
        }

        return max($ret);
    }
579763
function ( className ) {
            var el = this.element(),
                cName = $B( el ).attr( 'class' ),
                find = $B.array.is(className)? className : Array.prototype.slice.call(arguments);
    
            return cName? $B.string.isWholeWord( cName, find ) : false;
        }