code: function addClass(element, name) {
      var oldList = classList(element),
          newList = oldList + name;
  
      if (hasClass(oldList, name)) return; 
  
      // Trim the opening space.
      element.className = newList.substring(1);
    }
docs: (Internal) Adds a class to an element.