The main culprit of these problems is probably jQuery.makeArray.
It is supposed to convert anything to an array, but how about
NodeLists?
Maybe jQuery.makeArray have to call jQuery.merge internally if a
NodeList is given?
If so, then an jQuery.isNodeList is needed, I suppose.
On Oct 30, 5:01 pm, J
Eww... It must've been accidentally cut in the last release - but we
didn't notice because the "worst case" is only a minor perf hit. Well,
it makes it pretty easy to actually just remove it then! (Especially
if the only place where it's being used internally is in this
soon-to-be-stripped method.)
I came across an oddity with jQuery.merge from a completely different
route -- looking through jQuery.support properties. It looks like
jQuery.merge is testing for jQuery.support.getAll, but I can't for the
life of me find anywhere in the source where jQuery.support.getAll is
being defined.
I think you're right here - I'm not completely convinced that this
distinction still needs to exist. Could you file a ticket? Thanks.
--John
On Fri, Oct 30, 2009 at 7:47 AM, Robert Katić wrote:
> To be more accurate,
>
> $([]).add( nodeList )
>
> can not contains comment nodes only on IE.
>
To be more accurate,
$([]).add( nodeList )
can not contains comment nodes only on IE.
This makes it even more ambiguous, with unexpected results.
Also it seams that the only expected NodeList is from an
getElementsByTagName.call.
I know that it is not explicitly supported by the API, but even