code: function(attr, val, unit) {
          var el = this.getEl();
          if ( this.patterns.noNegatives.test(attr) ) {
              val = (val > 0) ? val : 0;
          }
  
          if (attr in el && !('style' in el && attr in el.style)) {
              el[attr] = val;
          } else {
              Y.Dom.setStyle(el, attr, val + unit);
          }
      }
docs: Applies a value to an attribute.
  @method setAttribute
  @param {String} attr The name of the attribute.
  @param {Number} val The value to be applied to the attribute.
  @param {String} unit The unit ('px', '%', etc.) of the value.