зеркало из 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)
|
||||
else
|
||||
{
|
||||
var child = 0;
|
||||
while ( node.childNodes && child < node.childNodes.length )
|
||||
else if ( node.childNodes )
|
||||
{
|
||||
for ( var child = 0; child < node.childNodes.length; child++ )
|
||||
DumpNodeAndChildren(node.childNodes[child], prefix + " ");
|
||||
child++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче