The current algorithm for get-elements-by-tag-name pushes each matching element into the top of an accumulation list. This reverses the order of children by nature, producing "surprising" behavior for anyone who assumes order is preserved.
This commit "fixes" this surprise by reversing the accumulation list back to original order on return.
The current algorithm for get-elements-by-tag-name pushes each matching element into the top of an accumulation list. This reverses the order of children by nature, producing "surprising" behavior for anyone who assumes order is preserved.
This commit "fixes" this surprise by reversing the accumulation list back to original order on return.