Closed
Bug 509241
Opened 15 years ago
Closed 13 years ago
localStorage.key(localStorage.length) not returning null as W3C spec says it should
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 738647
People
(Reporter: brett, Unassigned)
References
()
Details
(Keywords: html5, testcase)
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
The W3C Web Storage spec on localStorage.key() (http://dev.w3.org/html5/webstorage/#dom-storage-key) says that when an argument equal to or greater than the number of entries is given that null should be returned. But in fact an exception is currently being raised.
Reproducible: Always
Steps to Reproduce:
1. run ``localStorage.key(localStorage.length)``
2. Note the raised exception and how null is not returned as expected.
Actual Results:
[Exception... "Index or size is negative or greater than the allowed amount" code: "1" nsresult: "0x80530001 (NS_ERROR_DOM_INDEX_SIZE_ERR)"
Expected Results:
null should be returned.
Updated•15 years ago
|
Component: General → DOM: Mozilla Extensions
Product: Firefox → Core
QA Contact: general → general
Comment 1•15 years ago
|
||
Reset product/component to something hopefully more sane.
Comment 2•15 years ago
|
||
Confirming on Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a1pre) Gecko/20090919 Minefield/3.7a1pre
See the URL for the testcase.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: wanted1.9.2?
Version: unspecified → Trunk
Updated•15 years ago
|
Assignee: nobody → honzab.moz
Comment 3•13 years ago
|
||
This bug is still current, on Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0.1) Gecko/20100101 Firefox/5.0.1
Comment 5•13 years ago
|
||
Duping forward to bug 738647, because that one has a patch.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•12 years ago
|
Component: DOM: Mozilla Extensions → DOM
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•