Closed Bug 495748 Opened 16 years ago Closed 15 years ago

localStorage setItem to bool, getItem returns string

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: adam.christian, Unassigned)

References

()

Details

Attachments

(1 file)

Attached file Mozmill test case
Doing the following: localStorage.setItem("setBool", true); Appears to set the boolean item correctly, however running: localStorage.getItem("setBool") Returns a string, integer works correctly, so this appears to be a bug. Attaching the mozmill test case.
Component: General → DOM: Mozilla Extensions
Product: Firefox → Core
QA Contact: general → general
Version: 3.5 Branch → Trunk
I think this is invalid. From http://www.w3.org/TR/webstorage/#storage: Storage areas (both session storage and local storage) store strings. To store structured data in a storage area, you must first convert it to a string.
Attachment #380786 - Attachment mime type: text/x-c → text/plain
Thanks Jeff. Reading the specification really makes this bug invalid.
Status: NEW → RESOLVED
Closed: 15 years ago
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → INVALID
Note that the spec has changed to support more than just strings and I filed bug 538142.
Component: DOM: Mozilla Extensions → DOM
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: