src/aria/utils/Dom.js
function (src, dest) {
            // IE has a mergeAttributes method which does exactly that. Let's use it directly.
            // Note that copying attributes with a loop on attributes and setAttributes has strange results on IE7 (for
            // example, a TR can appear as disabled)
            if (Aria.$window.document.body.mergeAttributes) {
                this.copyAttributes = function (src, dest) {
                    dest.mergeAttributes(src, false);
                };
            } else {
                this.copyAttributes = function (src, dest) {
                    // on other browsers, let's copy the attributes manually:
                    var srcAttr = src.attributes;
                    for (var i = 0, l = srcAttr.length; i < l; i++) {
                        var attr = srcAttr[i];
                        dest.setAttribute(attr.name, attr.value);
                    }
                };
            }

            this.copyAttributes(src, dest);
        }
function (src, dest) {
            // IE has a mergeAttributes method which does exactly that. Let's use it directly.
            // Note that copying attributes with a loop on attributes and setAttributes has strange results on IE7 (for
            // example, a TR can appear as disabled)
            if (Aria.$window.document.body.mergeAttributes) {
                this.copyAttributes = function (src, dest) {
                    dest.mergeAttributes(src, false);
                };
            } else {
                this.copyAttributes = function (src, dest) {
                    // on other browsers, let's copy the attributes manually:
                    var srcAttr = src.attributes;
                    for (var i = 0, l = srcAttr.length; i < l; i++) {
                        var attr = srcAttr[i];
                        dest.setAttribute(attr.name, attr.value);
                    }
                };
            }

            this.copyAttributes(src, dest);
        }
function ( src , dest ) { // IE has a mergeAttributes method which does exactly that. Let's use it directly. // Note that copying attributes with a loop on attributes and setAttributes has strange results on IE7 (for // example, a TR can appear as disabled) if ( Aria . $window . document . body . mergeAttributes ) { this . copyAttributes = function ( src , dest ) { dest . mergeAttributes ( src , false ) ; } ; } else { this . copyAttributes = function ( src , dest ) { // on other browsers, let's copy the attributes manually: var srcAttr = src . attributes ; for ( var i = 0 , l = srcAttr . length ; i < l ; i ++ ) { var attr = srcAttr [ i ] ; dest . setAttribute ( attr . name , attr . value ) ; } } ; } this . copyAttributes ( src , dest ) ; }
Copy attributes from one dom element to another.
@param {HTMLElement} src Source element
@param {HTMLElement} dest Destination element
Copy attributes from one dom element to another .