Subj : Re: E4X: result of parent() method call on XMLList To : netscape.public.mozilla.jseng From : Martin Honnen Date : Sat Apr 16 2005 05:43 pm Martin Honnen wrote: > The E4X specification says that undefined should be returned on calling > parent() on an empty XMLList but Spidermonkey returns null. > The errata (https://bugzilla.mozilla.org/attachment.cgi?id=169406) > already mentions the discrepancy. > Is there any decision by now what should be returned, null or undefined? Spidermonkey behaves differently than I state above, for an empty XMLList it indeed returns undefined but for the following XMLList it returns null while the spec would mandate undefined too: js> var godList = <>KiboXibo; js> print(godList.parent()) null Rhino returns undefined. -- Martin Honnen http://JavaScript.FAQTs.com/ .