On 12/17/12 12:35 PM, Noit wrote:
So Im working hard to release an app but I cant use localStorage! Because data
is stored as a string, when i call it, back the data is still a string. I can't
use eval!! How can I use eval?
If you're trying to write a generic unprivileged webapp, you ought to be
able to use both localStorage and eval(). If you're trying to write a
Gaia app or otherwise create an app with privileges, you may be running
up against some performance and security restrictions. I don't actually
know the details, but I think we disabled localStorage for Gaia apps
because its synchronous API performs so poorly. And I believe that
using eval() violates our CSP security model for privileged apps.
gaia/shared/js/async_storage.js defines a asynchronous alternative to
localStorage that you might find helpful. And you probably shouldn't be
using eval() anyway. Would JSON.parse() work instead?
Man this app dev experience has been misreable.
There's a lot of developer documentation we still need to write, to
introduce new developers to the ins and outs of developing FirefoxOS
apps. Your feedback will be valuable. (Welcome to the bleeding edge :-)
David Flanagan
_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g
_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g