New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isArraylike #2238

Closed
mhbseal opened this Issue Apr 28, 2015 · 9 comments

Comments

Projects
None yet
5 participants
@mhbseal
Contributor

mhbseal commented Apr 28, 2015

if ( obj.nodeType === 1 && length ) {
return true;
}

this is not useful, because nodeList has no nodeType.

@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Apr 28, 2015

Member

Indeed, removing these lines doesn't break (including FF) any tests, was added in 3c7f2af

Issue exist in FF 19 but it's no longer reproducible in modern browsers. Would you like to sends us a PR?

/cc @rwaldron

Member

markelog commented Apr 28, 2015

Indeed, removing these lines doesn't break (including FF) any tests, was added in 3c7f2af

Issue exist in FF 19 but it's no longer reproducible in modern browsers. Would you like to sends us a PR?

/cc @rwaldron

@markelog markelog added the Core label Apr 28, 2015

@markelog markelog added this to the 3.0.0 milestone Apr 28, 2015

@mhbseal mhbseal referenced this issue Apr 28, 2015

Closed

isArraylike #2239

@gibson042

This comment has been minimized.

Show comment
Hide comment
@gibson042

gibson042 Apr 28, 2015

Member

The code still acts as a defense against form aliasing: http://jsfiddle.net/Lz0k4bn4/

We can either drop support or add a unit test.

Member

gibson042 commented Apr 28, 2015

The code still acts as a defense against form aliasing: http://jsfiddle.net/Lz0k4bn4/

We can either drop support or add a unit test.

@dmethvin

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Apr 28, 2015

Member

Is this change fixing a bug, or removing a feature? 😈 The length variable in that aliased test case is an HTMLInputElement so you couldn't use the form element as an arraylike object to iterate over its element collection.

Member

dmethvin commented Apr 28, 2015

Is this change fixing a bug, or removing a feature? 😈 The length variable in that aliased test case is an HTMLInputElement so you couldn't use the form element as an arraylike object to iterate over its element collection.

@gibson042

This comment has been minimized.

Show comment
Hide comment
@gibson042

gibson042 Apr 28, 2015

Member

The length variable in that aliased test case is an HTMLInputElement so you couldn't use the form element as an arraylike object to iterate over its element collection.

Nuh-uh: http://jsfiddle.net/Lz0k4bn4/1/ (check the console)

Member

gibson042 commented Apr 28, 2015

The length variable in that aliased test case is an HTMLInputElement so you couldn't use the form element as an arraylike object to iterate over its element collection.

Nuh-uh: http://jsfiddle.net/Lz0k4bn4/1/ (check the console)

@dmethvin

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Apr 28, 2015

Member

I must be missing something, here are some extra console logs: http://jsfiddle.net/Lz0k4bn4/2/

Member

dmethvin commented Apr 28, 2015

I must be missing something, here are some extra console logs: http://jsfiddle.net/Lz0k4bn4/2/

@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Apr 28, 2015

Member

Never supported this usage, in fact, we have always closed issues like that, see the most recent one

Member

markelog commented Apr 28, 2015

Never supported this usage, in fact, we have always closed issues like that, see the most recent one

@dmethvin

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Apr 28, 2015

Member

I agree, we have been closing them not because we are happy with having this bug, but because the aliasing problem is too hard to solve.

Member

dmethvin commented Apr 28, 2015

I agree, we have been closing them not because we are happy with having this bug, but because the aliasing problem is too hard to solve.

@timmywil

This comment has been minimized.

Show comment
Hide comment
@timmywil

timmywil Apr 28, 2015

Member

I'm fine with removing it.

Member

timmywil commented Apr 28, 2015

I'm fine with removing it.

@mhbseal mhbseal referenced this issue Apr 29, 2015

Closed

arraylike #2243

@gibson042

This comment has been minimized.

Show comment
Hide comment
@gibson042

gibson042 Apr 29, 2015

Member

Working around form aliasing is hard, especially in the general case, but it is possible for length (and also nodeType and nodeName, for that matter). I'm fine if we don't, but it merits a wont-fix mention analogous to Object.prototype manipulation.

Member

gibson042 commented Apr 29, 2015

Working around form aliasing is hard, especially in the general case, but it is possible for length (and also nodeType and nodeName, for that matter). I'm fine if we don't, but it merits a wont-fix mention analogous to Object.prototype manipulation.

@timmywil timmywil closed this in 436f0ae May 5, 2015

timmywil added a commit that referenced this issue May 5, 2015

markelog added a commit that referenced this issue Nov 10, 2015

@dmethvin dmethvin modified the milestones: 1.12/2.2, 3.0.0 Jan 7, 2016

@cssmagic cssmagic referenced this issue May 18, 2016

Open

jQuery #5

@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018

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