code: function (name, opts) {
              var self = this;
              if (typeof name === 'string') {
                  if (self.hasAttr(name)) {
                      // if attribute does not have default value, then set to undefined
                      return self.set(name, getDefAttrVal(self, name), opts);
                  } else {
                      return self;
                  }
              }
              opts = /**@type Object
           @ignore*/
              name;
              var attrs = self.getAttrs(), values = {};    // reset all
              // reset all
              for (name in attrs) {
                  values[name] = getDefAttrVal(self, name);
              }
              self.set(values, opts);
              return self;
          }
docs: Resets the value of an attribute.just reset what addAttr set
  (not what invoker set when call new Xx(cfg))
  @param {String} name name of attribute
  @param {Object} [opts] some options
  @param {Boolean} [opts.silent] whether fire change event
  @chainable