Element.getParents doc clarification #2252

Closed
umphy opened this Issue Jan 25, 2012 · 2 comments

Projects

None yet

3 participants

@umphy
Contributor
umphy commented Jan 25, 2012

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.

@arian
Member
arian commented Jan 25, 2012

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.

@umphy
Contributor
umphy commented Jan 25, 2012

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.

@ibolmo ibolmo closed this Jan 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment