code: function(name, value) {
                  var attrs, i, self = this;
                  if ('string' !== typeof name) {
                      for (i in name) {
                          self.attr(i, name[i]);
                      }
                      return self;
                  }
                  if (attrs = self.attributes) {
                      if (value !== undefined) {
                          // Remove attribute
                          if (null === value) {
                              if (name in attrs.map) {
                                  delete attrs.map[name];
                                  i = attrs.length;
                                  while (i--) {
                                      if (attrs[i].name === name) {
                                          attrs = attrs.splice(i, 1);
                                          return self;
                                      }
                                  }
                              }
                              return self;
                          }
                          // Set attribute
                          if (name in attrs.map) {
                              // Set attribute
                              i = attrs.length;
                              while (i--) {
                                  if (attrs[i].name === name) {
                                      attrs[i].value = value;
                                      break;
                                  }
                              }
                          } else {
                              attrs.push({
                                  name: name,
                                  value: value
                              });
                          }
                          attrs.map[name] = value;
                          return self;
                      }
                      return attrs.map[name];
                  }
              }
docs: Gets/sets or removes an attribute by name.
  
  @example
  someNode.attr("name", "value"); // Sets an attribute
  console.log(someNode.attr("name")); // Gets an attribute
  someNode.attr("name", null); // Removes an attribute
  
  @method attr
  @param {String} name Attribute name to set or get.
  @param {String} value Optional value to set.
  @return {String/tinymce.html.Node} String or undefined on a get operation or the current node on a set operation.