incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Mueller (Commented) (JIRA)" <>
Subject [jira] [Commented] (CB-155) localStorage does not work with square brace notation
Date Thu, 05 Jan 2012 14:29:39 GMT


Patrick Mueller commented on CB-155:

Don't know if WP7 has any tricks up it's sleeve, but as far as I know with JSC and V8, there's
no way to "simulate" array accessors like this.  The alternative is for folks to code to the
alternate APIs, listed here: ; specifically:

interface Storage {
  DOMString key(in unsigned long index);
  DOMString getItem(in DOMString key);
  void setItem(in DOMString key, in DOMString data);
  void removeItem(in DOMString key);

Note, this still leaves the "length" attribute, which it may be possible to fake with a "getter"
property, via Object.defineProperty():

Usage of Object.__defineGetter__()/__defineSetter__() instead of defineProperty() is probably
best avoided, unless that's the only way we can do it with WP7.

> localStorage does not work with square brace notation
> -----------------------------------------------------
>                 Key: CB-155
>                 URL:
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: WP7
>    Affects Versions: 1.3.0
>            Reporter: Colin Eberhardt
>            Assignee: Jesse MacFadyen
> Currently the WP7 localStorage shim works if you use localStorage setItem / getItem methods,
however, it fails if you use the square brace notation:
> localStorage["key"] = someValue;

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message