[Prototype-core] RangeError: Maximum call stack size exceeded
This note is mostly to help other people searching for answers. I was doing some prototypish calling on a small two dimensional array (10 x 5). rows.each(function(row){ row.each(function(cell){ /* do stuff */ }) }); Fine in IE fine in FF. Fails silently on webkit based browsers (Chrome, Safari). I tried repeating the process in the Chrome console and received the error: RangeError: Maximum call stack size exceeded After unfolding the loops to standard for statements everything worked just fine. Credit to tfluehr on IRC #prototype for helping me out with this one and for this link: http://novemberborn.net/javascript/callstack-size (Mark Wubben) It goes into some details on the call stacks for current browsers. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: readAttribute() differences IE and Firefox
No I take that back, I think identity is susceptible to the same problem. On Feb 12, 12:42 pm, Doctuh [EMAIL PROTECTED] wrote: Something I forgot to add: using the .identify() method on the form avoids this problem entirely. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] Re: readAttribute() differences IE and Firefox
Something I forgot to add: using the .identify() method on the form avoids this problem entirely. On Feb 12, 12:37 pm, Doctuh [EMAIL PROTECTED] wrote: My first post. This is to document a tricky thing I found while using Element.readAttribute() on a form. This post is to help the next person looking for an answer on it. ex: form id=foo input type=hidden name=id' value=bar / /form If you have a form with a hidden form element named 'id', and you try to use readAttribute() on the form you will get two different responses: IE gives you an Object (the input object named 'id') Firefox gives you 'foo'. IE will give you 'foo' is there is not a overriding form element. I did not expect this, thinking that readAttribute would be normalizing these behaviors, but IE sigh. This tied me up for a little while. Thanks to jdalton and tobie on FreeNode for the help. - Internet Explorer IE Firefox FF Element.readAttribute() readAttribute() String [object] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---
[Prototype-core] readAttribute() differences IE and Firefox
My first post. This is to document a tricky thing I found while using Element.readAttribute() on a form. This post is to help the next person looking for an answer on it. ex: form id=foo input type=hidden name=id' value=bar / /form If you have a form with a hidden form element named 'id', and you try to use readAttribute() on the form you will get two different responses: IE gives you an Object (the input object named 'id') Firefox gives you 'foo'. IE will give you 'foo' is there is not a overriding form element. I did not expect this, thinking that readAttribute would be normalizing these behaviors, but IE sigh. This tied me up for a little while. Thanks to jdalton and tobie on FreeNode for the help. - Internet Explorer IE Firefox FF Element.readAttribute() readAttribute() String [object] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~--~~~~--~~--~--~---