I could be wrong here but it's because Mootools extends Array.prototype so you get more back from the for-in loop than you expect. That's the reason why Mootools has it's own Array.each implementation. Now that's why it breaks, how to get it sorted I can't help you with. / Tor
On Monday, May 27, 2013 10:17:17 AM UTC+2, Iwan Budi Kusnanto wrote: > On Mon, May 27, 2013 at 2:55 PM, Sanford Whiteman > <sa...@figureone.com<javascript:>> > wrote: > > Please put an example in jsfiddle.net to check out. There is certainly > > nothing in Moo that will "break" for-in in JS. > > Hi, > > Sorry,maybe 'failed' or 'not compatible' will be a better world. > > http://jsfiddle.net/4bwTc/1/ > Commented code is the code when using jquery. > > It use jssip(https://github.com/versatica/JsSIP/) > jssip will failed in this line > https://github.com/versatica/JsSIP/blob/master/src/UA.js#L932 > > By changing this line > (https://github.com/versatica/JsSIP/blob/master/src/UA.js#L930) to > for (var idx=0; idx < ws_servers.length; idx++) { > jssip will work fine. > > There is already a pull request in jssip repo to change 'for in' loop > into above form. > > i'm just wondering why that code failed when using mootools but works > fine when using jquery. > > > > > > -- S. > > > > -- > > > > --- > > You received this message because you are subscribed to the Google > Groups "MooTools Users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to mootools-user...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > > -- > Iwan Budi Kusnanto > -- --- You received this message because you are subscribed to the Google Groups "MooTools Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mootools-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.