#7946 closed bug (duplicate)
JS error in IE8, when jQuery.each is used on document.styleSheets
Reported by: | anonymous | Owned by: | dmethvin |
---|---|---|---|
Priority: | high | Milestone: | 1.6 |
Component: | core | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When trying the HTML sample below, IE8 throws an "Error: Invalid procedure call or argument". This happens because a nonexistent entry is accessed on the styleSheets collection.
<html> <head> <style> </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script> $.each(document.styleSheets, function(i) {
alert(i);
}); </script> </head> </html>
Change History (5)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Component: | unfiled → core |
---|---|
Keywords: | needsreview added |
Priority: | undecided → high |
Status: | new → open |
Confirmed.
Marked as high, but needs closer review
comment:3 Changed 12 years ago by
Keywords: | needsreview removed |
---|---|
Milestone: | 1.next → 1.6 |
Owner: | set to dmethvin |
Status: | open → assigned |
Looks like the attempt to reference object[ ++i ]
when i is out of bounds is causing an exception in IE. The fix looks pretty simple though.
comment:4 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
jsFiddle sample URL: http://jsfiddle.net/GgrSV/