[Developers] mjt.for
Alec Flett
alecf at metaweb.com
Fri Jun 22 18:57:38 UTC 2007
I think part of the problem is that a number of DOM arrays are only
psuedo-Arrays as well.
try this in firebug:
> >> for (var k in document.childNodes) { console.log(k, " = ", x[k]) }
0 = 1
1 = 2
length = 3
item
lovely, eh?
IE behaves a little differently too I believe...
Alec
Nick Thompson wrote:
> this should already work for javascript's built-in Array.
> jQuery result sets aren't true arrays though, which might be
> what you're seeing?
>
> the next release will treat jQuery "arrays" as Array for
> mjt.for= iteration purposes. if there other pseudo-Array
> objects that should behave like arrays in mjt.for=, i can
> hopefully add them too...
>
> nick
>
> Dae Park wrote:
>
>> Feature request:
>>
>> Can you extend mjt.for="k,v in object" to arrays as well, like jQuery's
>> $.each(array, function(i,n){})?
>>
>> -dae
>>
> _______________________________________________
> Developers mailing list
> Developers at freebase.com
> http://lists.freebase.com/mailman/listinfo/developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/developers/attachments/20070622/d3fe3031/attachment.html
More information about the Developers
mailing list