code: function (name, value) {
          var self = this, hook;
  
          if (typeof name === "object") {
            each(name, function (name, value) {
              self.attr(name, value);
            });
          } else if (isDefined(value)) {
            this.each(function () {
              var hook;
  
              if (this.nodeType === 1) {
                hook = attrHooks[name];
                if (hook && hook.set) {
                  hook.set(this, value);
                  return;
                }
  
                if (value === null) {
                  this.removeAttribute(name, 2);
                } else {
                  this.setAttribute(name, value, 2);
                }
              }
            });
          } else {
            if (self[0] && self[0].nodeType === 1) {
              hook = attrHooks[name];
              if (hook && hook.get) {
                return hook.get(self[0], name);
              }
  
              if (booleanMap[name]) {
                return self.prop(name) ? name : undef;
              }
  
              value = self[0].getAttribute(name, 2);
  
              if (value === null) {
                value = undef;
              }
            }
  
            return value;
          }
  
          return self;
        }
docs: Sets/gets attributes on the elements in the current set.
  
  @method attr
  @param {String/Object} name Name of attribute to get or an object with attributes to set.
  @param {String} value Optional value to set.
  @return {tinymce.dom.DomQuery/String} Current set or the specified attribute when only the name is specified.