W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

[widgets] localStorage vs preferences

From: Marcos Caceres <marcosc@opera.com>
Date: Mon, 20 Jul 2009 16:08:34 +0200
Message-ID: <b21a10670907200708v46b417a0x2813877f2eaca0ad@mail.gmail.com>
To: public-webapps <public-webapps@w3.org>
In the widgets API spec, what are the advantages of having a
widgets.preferences attribute when the window.localStorage is already
available on the window object?

I think we should:

 1. Drop widget.preferences, but require a UA to implement
[WebStorage] (which we already do!).
 2. Pre-populate the window.localStorage with the value of
<preference> elements in the config document (no events are fired
during pre-population!).
 3. "Protect" read-only preferences, meaning:
      A. At runtime, throw a NO_MODIFICATION_ALLOWED_ERR exception
upon any attempt to invoke the setItem() or removeItem() methods.
      B. upon the attempted invocation of the clear() method, a user
agent must not remove the key-values of the protected preference from
a storage area.


Kind regards,
Marcos Caceres
Received on Monday, 20 July 2009 14:09:41 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:17 UTC