I am developing a Firefox add-on that uses localStorage to store user data in a website context. It accesses local storage through injectable content scripts using standard methods:
localStorage.getItem(key);
localStorage.setItem(key, value);
The code that calls localStorege is injected into the website using PageMod:
pageMod.PageMod({
contentScriptFile: [
self.data.url("app.js")
]})
When the getItem / setItem method is called, a security exception is thrown:
[Exception ... "The operation is unsafe." code: "18" nsresult: "0x80530012 (SecurityError)" location: ""]
, . , - FireFox, : http://meyerweb.com/eric/thoughts/2012/04/25/firefox-failing-localstorage/
- , ?
:
- Addon SDK 1.16
- FF 29.0 RC1 ( FF 28)