Closed
Bug 754553
Opened 13 years ago
Closed 13 years ago
Remove indexed property access from localStorage/sessionStorage
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: Ms2ger, Assigned: Ms2ger)
References
Details
(Keywords: dev-doc-needed)
Attachments
(1 file)
2.72 KB,
patch
|
sicking
:
review+
mayhemer
:
feedback+
|
Details | Diff | Splinter Review |
Currently, we allow localStorage[i] to mean localStorage.key(i). However, the spec doesn't support this, and neither does any other browser. We should either remove support or get it specced.
I'd rather remove support, because this feature means that after |localStorage[str] = foo;|, localStorage[str] will return foo iff str is not an integer (or a string representing an integer, because JS is weakly typed), and I'd suspect authors may want to use integer keys.
Attachment #623405 -
Flags: review?(jonas)
Comment on attachment 623405 [details] [diff] [review]
Patch v1
Review of attachment 623405 [details] [diff] [review]:
-----------------------------------------------------------------
Sounds good to me given that this updates us to the spec. (As I understand it the spec changed under us).
Want to get an ok from Honza though since he's been owning this.
Attachment #623405 -
Flags: review?(jonas)
Attachment #623405 -
Flags: review+
Attachment #623405 -
Flags: feedback?(honzab.moz)
![]() |
||
Updated•13 years ago
|
Attachment #623405 -
Flags: feedback?(honzab.moz) → feedback+
Assignee | ||
Comment 2•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Keywords: dev-doc-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
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
•