Use Array.prototype.forEach.call in copyAttributes

Change-Id: I6c890fecf6f6002d44b32f0c85a3193c0c2632e3
This commit is contained in:
Ed Sanders 2020-08-18 23:17:03 +01:00
parent 879f006b7b
commit d62fc8b49a

View file

@ -53,10 +53,9 @@
var i, len;
function copyAttributes( from, to ) {
var i2, len2;
for ( i2 = 0, len2 = from.attributes.length; i2 < len2; i2++ ) {
to.setAttribute( from.attributes[ i2 ].name, from.attributes[ i2 ].value );
}
Array.prototype.forEach.call( from.attributes, function ( attr ) {
to.setAttribute( attr.name, attr.value );
} );
}
if ( oldDoc ) {