Ticket #11998 (closed feature: wontfix)
Change array.length check to $.isArray
|Reported by:||anonymous||Owned by:|
I would like to propose changing makeArray to use !$.isArray(array) rather than array.length == null.
The motivation is that I use .on on instances such as file readers or file writers. That way I can take advantage of jQuery's event namespacing system, and it's a clean way of attaching events since I'm using .on for elements as well.
The issue is that FileWriters have a length property and as such jQuery recognises it as an array. Consequently, .on does not work on file writers.
I know $(someFileWriter) is perhaps not what jQuery is for, but I do think it's worth mentioning and hopefully this issue can be addressed. It would be awesome to have jQuery support .on for any instance that has addEventListener so that its event features can be used on those instances.