Skip to main content

Bug Tracker

Side navigation

#6825 closed enhancement (fixed)

Opened July 25, 2010 08:29PM UTC

Closed August 27, 2010 05:17PM UTC

Last modified March 13, 2012 09:48PM UTC

Use Array.isArray for jQuery.isArray when available

Reported by: salty-horse Owned by:
Priority: Milestone: 1.4.3
Component: core Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:
Description

Originally posted on the forum

Patch available on github: http://github.com/salty-horse/jquery/commits/array

ECMAScript 5 defines Array.isArray which is available in Firefox and WebKit (only ones I checked).

I think jQuery should use it, if available, instead of checking the object's toString being "[object Array]".

For one, it will solve a problem I have with WebKit and Qt. It allows one to expose Qt arrays in javascript, but those are of the RuntimeArray class. This causes the jQuery isArray function to fail identifying them as arrays, while the native Array isArray succeeds.

Attachments (0)
Change History (1)

Changed August 27, 2010 05:17PM UTC by john comment:1

resolution: → fixed
status: newclosed