Side navigation
#4366 closed bug (fixed)
Opened March 17, 2009 09:02PM UTC
Closed April 12, 2011 04:12AM UTC
$.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.
Attachments (0)
Change History (9)
Changed March 21, 2009 02:42AM UTC by comment:1
Changed March 26, 2009 12:08AM UTC by comment:2
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.
Changed March 26, 2009 01:24AM UTC by comment:3
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.
Changed August 07, 2009 05:03PM UTC by comment:4
component: | unfilled → core |
---|
Changed November 18, 2010 03:45AM UTC by comment:5
milestone: | 1.4 |
---|---|
status: | new → open |
Changed March 25, 2011 06:06PM UTC by comment:6
milestone: | → 1.6 |
---|---|
priority: | minor → high |
Changed March 30, 2011 05:15PM UTC by comment:8
_comment0: | Committing patch in a sec :) → 1301505610783955 |
---|
Fixed: pull request > https://github.com/jquery/jquery/pull/290/files
Changed April 12, 2011 04:12AM UTC by comment:9
resolution: | → fixed |
---|---|
status: | open → closed |
Landed.
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.