mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Use Array.prototype.forEach.call in copyAttributes
Change-Id: I6c890fecf6f6002d44b32f0c85a3193c0c2632e3
This commit is contained in:
parent
879f006b7b
commit
d62fc8b49a
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue