code: function elementType(element) {
    var name = element.nodeName.toLowerCase();
    if (name !== "input") {
      if (name === "select" && element.multiple) {
        return "select-multiple";
      }
      return name;
    }
    var type = element.getAttribute('type');
    if (!type) {
      return "text";
    }
    return type.toLowerCase();
  }
docs: Returns the type of a DOM element.
  
  @param  Object element A DOM element.
  @return String         The DOM element type.