On Jul 5, 2006, at 4:34 PM, Tom W.M. wrote:

I seem to have found a bug in isArrayLike(), and, by association, repr().  The issue deals with DOM text nodes:

>>> repr(document.createTextNode ("text"))
"[undefined, undefined, undefined, undefined]"
>>> isArrayLike(document.createTextNode("text"))
true

Presumably this is because text nodes have a length property.

I just spent hours trying to figure out where huge arrays of undefined were coming from in my logging messages as my script traversed the DOM.  It wasn't even really a bug--the calls to repr() were simply taking so long that Firefox's "stop this script" error message was popping up, making me think that I had an infinite loop somewhere. 

I went ahead and added a hack for that.


-bob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to