public/javascripts/yui/animation/animation-debug.js
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);
        }
    }
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);
        }
    }
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 ) ; } }
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.
Applies a value to an attribute .