code: function(element, className) {
      invariant(
        !/\s/.test(className),
        'CSSCore.addClass takes only a single class name. "%s" contains ' +
        'multiple classes.', className
      );
  
      if (className) {
        if (element.classList) {
          element.classList.add(className);
        } else if (!CSSCore.hasClass(element, className)) {
          element.className = element.className + ' ' + className;
        }
      }
      return element;
    }
docs: Adds the class passed in to the element if it doesn't already have it.
  
  @param {DOMElement} element the element to set the class on
  @param {string} className the CSS className
  @return {DOMElement} the element passed in