Issue with the example for Element.contains(). Fixes #2147 #2148

Merged
merged 2 commits into from Dec 1, 2011

Conversation

Projects
None yet
2 participants
@oskarkrawczyk
Contributor

oskarkrawczyk commented Dec 1, 2011

No description provided.

@ibolmo

This comment has been minimized.

Show comment Hide comment
@ibolmo

ibolmo Dec 1, 2011

Member

Actually, contains should accept an id string. Must be a backwards compat problem.

Member

ibolmo commented Dec 1, 2011

Actually, contains should accept an id string. Must be a backwards compat problem.

@oskarkrawczyk

This comment has been minimized.

Show comment Hide comment
@oskarkrawczyk

oskarkrawczyk Dec 1, 2011

Contributor

Shouldn't the docs provide examples for the non-compat version?

Contributor

oskarkrawczyk commented Dec 1, 2011

Shouldn't the docs provide examples for the non-compat version?

@ibolmo

This comment has been minimized.

Show comment Hide comment
@ibolmo

ibolmo Dec 1, 2011

Member

Well issue with the docs is that they are showing the latest code. For a long time I've wanted version dependent docs. So no, right now the docs should show how to write the code for 1.4.1.

I just did some research and looks like we've never had a contains method. Just a hasChild, and that has proper BC.

The contains you're seeing is a cross-browser fix so that it's available everywhere. The API is such that it complies with: http://msdn.microsoft.com/en-us/library/ms536377(v=vs.85).aspx.

Member

ibolmo commented Dec 1, 2011

Well issue with the docs is that they are showing the latest code. For a long time I've wanted version dependent docs. So no, right now the docs should show how to write the code for 1.4.1.

I just did some research and looks like we've never had a contains method. Just a hasChild, and that has proper BC.

The contains you're seeing is a cross-browser fix so that it's available everywhere. The API is such that it complies with: http://msdn.microsoft.com/en-us/library/ms536377(v=vs.85).aspx.

@ibolmo

This comment has been minimized.

Show comment Hide comment
@ibolmo

ibolmo Dec 1, 2011

Member

Can you include a fix to the arguments list?

Arguments:

el - (element) The element to search for.
Member

ibolmo commented Dec 1, 2011

Can you include a fix to the arguments list?

Arguments:

el - (element) The element to search for.
@oskarkrawczyk

This comment has been minimized.

Show comment Hide comment
@oskarkrawczyk

oskarkrawczyk Dec 1, 2011

Contributor

Done.

Contributor

oskarkrawczyk commented Dec 1, 2011

Done.

@ibolmo

This comment has been minimized.

Show comment Hide comment
@ibolmo

ibolmo Dec 1, 2011

Member

TY! Keep 'em coming

Member

ibolmo commented Dec 1, 2011

TY! Keep 'em coming

ibolmo added a commit that referenced this pull request Dec 1, 2011

Merge pull request #2148 from oskarkrawczyk/master
Issue with the example for Element.contains(). Fixes #2147

@ibolmo ibolmo merged commit e2b7f0b into mootools:master Dec 1, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment