Ticket #5740 (closed enhancement: invalid)
each method should support XML
|Reported by:||sephr||Owned by:|
|Keywords:||e4x, xml, each||Cc:|
When I say XML, I mean native XML via E4X (ECMA-357) which is implemented by SpiderMonkey and Rhino. If typeof this === "xml" for the each method, then the following algorithm should be used.
If xml.length() === 1, then let len = xml.*.length() and iterate over xml.*
If xml.length() !== 1 (do not use > 1 as it can also be 0), then let len = xml.length() and iterate over xml.
This algorithm would iterate over XML nodes in XMLLists and XML child nodes in an XML node.