In the docs it says "Like Element:getParent, but returns a collection of all the matched parentNodes up the tree."
But since it returns a collection, unlike Element:getParent, if no matching parents are found then it returns an empty array rather than null.
Right, that's the correct behavior indeed. However you're saying the documentation could be a bit clearer?
If you want you could go to https://github.com/mootools/mootools-core/blob/master/Docs/Element/Element.md and click the 'Fork and edit file' button, and fix it yourself, and send a pull request. Otherwise we'll try to fix this later.
Yep I'm saying it could be a bit clearer. This may apply to other
similar methods that return collections; I haven't checked.
I've never tried that on GitHub. May try later.