Nils Posted July 27, 2007 Posted July 27, 2007 It would be great if you could remove all for(... in ...) loops from your javascript files and replace them by normal for(i=...;...;i++) loops. I know they work fine usually, but when you are using a library that extends the Object object (for example prototype), the loop returns several methods in addition to the array's items, which breaks several functions.
Shawn Dean Posted July 29, 2007 Posted July 29, 2007 Some of the for (var x in y) commands are necessary because not all y varaibles are arrays, they are objects, thus you can't do a simple for (var x=0; x<y.length; x++) command.
bfarber Posted July 30, 2007 Posted July 30, 2007 We updated a lot of these in 2.3, because I implemented lightbox in Gallery (which uses prototype). Mainly in the menu generation javascript libraries.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.