<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I think part of the problem is that a number of DOM arrays are only
psuedo-Arrays as well.<br>
<br>
try this in firebug:<br>
<div class="logRow logRow-command"><span
class="objectBox objectBox-text">>>> for (var k in
document.childNodes) { console.log(k, " = ", x[k]) }</span></div>
<div class="logRow logRow-log"><span class="objectBox objectBox-text">0</span>
<span class="objectBox objectBox-text"> = </span> <span
class="objectBox objectBox-number">1</span></div>
<div class="logRow logRow-log"><span class="objectBox objectBox-text">1</span>
<span class="objectBox objectBox-text"> = </span> <span
class="objectBox objectBox-number">2</span></div>
<div class="logRow logRow-log"><span class="objectBox objectBox-text">length</span>
<span class="objectBox objectBox-text"> = </span> <span
class="objectBox objectBox-number">3</span></div>
<span class="objectBox objectBox-text">item<br>
<br>
lovely, eh?<br>
<br>
IE behaves a little differently too I believe...<br>
<br>
Alec<br>
</span><br>
Nick Thompson wrote:
<blockquote cite="mid:467C0525.40002@metaweb.com" type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">Feature request:
Can you extend mjt.for="k,v in object" to arrays as well, like jQuery's
$.each(array, function(i,n){})?
-dae
</pre>
</blockquote>
<pre wrap=""><!---->_______________________________________________
Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Developers@freebase.com">Developers@freebase.com</a>
<a class="moz-txt-link-freetext" href="http://lists.freebase.com/mailman/listinfo/developers">http://lists.freebase.com/mailman/listinfo/developers</a>
</pre>
</blockquote>
<br>
</body>
</html>