WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 8080
17137
Iterating over document.styleSheets omits numeric indices
https://bugs.webkit.org/show_bug.cgi?id=17137
Summary
Iterating over document.styleSheets omits numeric indices
Mike Walters
Reported
2008-02-01 08:18:43 PST
for(var i in document.styleSheets) <-- doesnt work { document.styleSheets[i] is undefined always } for(var i=0; i<document.styleSheets.length; i++) { document.styleSheets[i] works! }
Attachments
Add attachment
proposed patch, testcase, etc.
Mark Rowe (bdash)
Comment 1
2008-02-01 08:19:55 PST
The problem is that iterating over document.styleSheets only returns "item" and "length", not the numeric indices. In Firefox it returns the numeric indices followed by "item" and "length".
Mark Rowe (bdash)
Comment 2
2008-02-01 08:26:20 PST
It seems this affects HTMLCollection along with StyleSheetList. There are probably others.
Mark Rowe (bdash)
Comment 3
2008-02-01 08:29:36 PST
This is the same as
bug 8080
. *** This bug has been marked as a duplicate of
8080
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug