I am wondering if it would be necessary to check if (i in object) too, in future (with i < length). I hope not :).
On Mar 17, 2:29 pm, John Resig <[email protected]> wrote: > Would you be open to filing a bug on this? Thanks. > > What a stupid behavior on the part of IE. > > --John > > On Tue, Mar 17, 2009 at 3:35 AM, Danny <[email protected]> wrote: > > > $.each(document.styleSheets... fails with the error: > > Line: 692 > > Character: 11 > > Code: 0 > > Error Message: Invalid procedure call or argument > > > The simplest page with the error is: > > > <script type="text/javascript" src="http://ajax.googleapis.com/ajax/ > > libs/jquery/1.3.2/jquery.js<http://ajax.googleapis.com/ajax/%0Alibs/jquery/1.3.2/jquery.js>" > > ></script> > > <script> > > $.each (document.styleSheets, function(){}); > > </script> > > > (making the markup valid and adding a DOCTYPE don't help). > > > A regular for loop works fine. > > > It seems the problem is the object[++i] at the end of the loop; > > instead of returning undefined it throws the error. > > > Danny > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
