On Wed, 27 May 2009 20:37:53 +0200, Adam Barth <[email protected]> wrote:
Do widgets not plan to make use of localStorage? This seems useful,
for example, in a weather widget, to store the list of ZIP codes that
the user wants to see the weather for.
This issue is twofold:
1. A widget is simply a packaging for any application, and may use any
technology a widget user agent supports, so in that sense, a widget that
supports HTML5 should support anything in widget transparently and without
workaround. This implies that widgets with underlying support would
support HTML5 localStorage
2. The Widgets APIs and events uses the same storage interface as HTML5
localStorage for storing preferences, and as such it is stored (although
in this case, the storage is not origin-bound, like in HTML5.
With a random per-instance
origin, the widget won't be able to access its localStorage from its
last invocation.
Note that "random per-instance origin" here would normally imply that the
instance is created exactly once, on installation, instead of a new
instance for every invocation, so a widget should keep the origin across
invocations.
--
Arve Bersvendsen
Opera Software ASA, http://www.opera.com/