Make nsXULElement::GetChildNodes use the same (live) node list that

nsGenericElement uses.  Bug 240633, r+sr=jst on the C++ changes, r=neil, sr=jst
on the JS changes.
This commit is contained in:
bzbarsky%mit.edu 2006-09-14 06:08:32 +00:00
Родитель 3e1c382ebb
Коммит d55aee8d7a
2 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -304,7 +304,7 @@ function createRadioMenuItem( aParent, aIndex, aLabel, aChecked)
function deleteHistoryItems(aParent)
{
var children = aParent.childNodes;
for (var i = 0; i < children.length; i++ )
for (var i = children.length - 1; i >= 0; --i )
{
var index = children[i].getAttribute( "index" );
if (index)

Просмотреть файл

@ -191,9 +191,8 @@
<method name="clearEngines">
<body><![CDATA[
var kids = this.mSearchBox.childNodes;
for (var i = kids.length-1; i >= 0; --i)
this.mSearchBox.removeChild(kids[i]);
while (this.mSearchBox.hasChildNodes())
this.mSearchBox.removeChild(this.mSearchBox.lastChild);
]]></body>
</method>