зеркало из https://github.com/mozilla/gecko-dev.git
Code optomization suggested by Brendan Eich.
This commit is contained in:
Родитель
4f1d65bded
Коммит
46c5a761fe
|
@ -57,14 +57,10 @@ function DumpNodeAndChildren(node, prefix)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// children of nodes (other than frames)
|
// children of nodes (other than frames)
|
||||||
else
|
else if ( node.childNodes )
|
||||||
{
|
{
|
||||||
var child = 0;
|
for ( var child = 0; child < node.childNodes.length; child++ )
|
||||||
while ( node.childNodes && child < node.childNodes.length )
|
|
||||||
{
|
|
||||||
DumpNodeAndChildren(node.childNodes[child], prefix + " ");
|
DumpNodeAndChildren(node.childNodes[child], prefix + " ");
|
||||||
child++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче