Opened 15 years ago
Closed 12 years ago
#4366 closed bug (fixed)
$.each fails in IE with document.styleSheets
Reported by: | d.wachss | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.6 |
Component: | core | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$.each (document.styleSheets, function(){});
fails in Internet Explorer with the error:
Line: 692 Character: 11 Code: 0 Error Message: Invalid procedure call or argument
It seems the problem is the object[++i] at the end of the loop in $.each; instead of returning undefined it throws the error.
Change History (9)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Great post by Richard Cornford analyzing this bug: http://groups.google.com/group/comp.lang.javascript/msg/468705660cc10d82
Looks like this is a bug that can be fixed.
comment:3 Changed 15 years ago by
The bug is fixable, but Richard Cornford's analysis is wrong. The bug shows up no matter how large the collection is. His comments are largely aimed at criticizing jQuery.
comment:4 Changed 14 years ago by
Component: | unfilled → core |
---|
comment:5 Changed 13 years ago by
Milestone: | 1.4 |
---|---|
Status: | new → open |
comment:6 Changed 13 years ago by
Milestone: | → 1.6 |
---|---|
Priority: | minor → high |
comment:8 Changed 12 years ago by
Fixed: pull request > https://github.com/jquery/jquery/pull/290/files
Note: See
TracTickets for help on using
tickets.
jQuery-dev related thread:
http://groups.google.com/group/jquery-dev/browse_frm/thread/80ff60037e954521#
I tend to agree that this may be something to document rather than fix, since it should be relatively rare.