Re: Insertbefore - c++ success and then failure
Boris Zbarsky <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > There seems to be no difference between the successful and failed > except the way the element was found. The successful insert is > inserting before an element just added to the DOM, the failed is > inserting before an already existing element. Just added to the dom _where_? Already existing _where_? > i = domDoc->InsertBefore(ielement, ielement2, > getter_AddRefs(dnode2)); The object you call InsertBefore on should be the parent of ielement2. Clearly that's not the case here. I suspect that it's not true in any of your other calls either. Of course all this is documented in the DOM spec. -Boris