Closed Bug 1081836 Opened 11 years ago Closed 11 years ago

Local storage: TypeError: localStorage.setItem is not a function

Categories

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

32 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: sergiy.golub74, Unassigned)

References

Details

Attachments

(1 file)

Attached image ls_1.png
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36 Steps to reproduce: I have problem with local Storage object in my browser firefox vers.32.0.3 for windows7 I have error: TypeError: localStorage.setItem is not a function When I console.log(localStorage) I see what methods was declaration how string If that my local problem or global? How fix that any propose.
Component: General → DOM
Summary: local Storag TypeError: localStorage.setItem is not a function → Local storage: TypeError: localStorage.setItem is not a function
Can you provide a URL that reproduces this problem? If you open your Firefox preferences and look at the Privacy tab, what are your history settings? In particular, are you using non-default cookie settings?
Flags: needinfo?(sergiy.golub74)
I don't use non-default cookie. console.log(LocalStorage) get localStorage Storage { clear: "function () { var e, result; callBeforeHooks(hookSite, this, arguments); try { result = func.apply(this, arguments); } catch (_error) { e = _error; callExceptHooks(hookSite, this, arguments, e); throw e; } finally { callAfterHooks(hookSite, this, arguments, result); } return result; }", test: "123123123", __amplify__Geo: "{"data":"UA","expires":null}", setItem: "function () { var e, result; callBeforeHooks(hookSite, this, arguments); try { result = func.apply(this, arguments); } catch (_error) { e = _error; callExceptHooks(hookSite, this, arguments, e); throw e; } finally { callAfterHooks(hookSite, this, arguments, result); } return result; }", removeItem: "function () { var e, result; callBeforeHooks(hookSite, this, arguments); try { result = func.apply(this, arguments); } catch (_error) { e = _error; callExceptHooks(hookSite, this, arguments, e); throw e; } finally { callAfterHooks(hookSite, this, arguments, result); } return result; }", length: 5 }
Flags: needinfo?(sergiy.golub74)
Again, is there a page that reproduces this behaviour? That log output you pasted suggests that the site is wrapping localStorage in its own JavaScript object.
Thank you. This is my local problem.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
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: