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

Re: [widgets] localStorage vs preferences

From: Scott Wilson <scott.bradley.wilson@gmail.com>
Date: Mon, 20 Jul 2009 15:32:34 +0100
Cc: public-webapps <public-webapps@w3.org>
Message-Id: <2BB1ED9B-F585-41D2-B2A4-188FA26534DB@gmail.com>
To: marcosc@opera.com
-1

No, we should keep widget.preferences.

If a UA wants to, it can simply implement it using:

widget.preferences = window.localStorage;

If it doesn't, the UA can do its own implementation, which we do for  
example, as for our UA localStorage is not an appropriate  
implementation, as our users are more likely to interact with the same  
widget using multiple browsers on multiple machines. We can also  
implement widget.preferecences. We can't reimplement the user's  
browser's WebStorage impl (if it has one).

For more detailed arguments for keeping preferences, just search back  
through the list ;-)

(We've already argued this one loads of times, Marcos! Why has it come  
up again?)

S

On 20 Jul 2009, at 15:08, Marcos Caceres wrote:

> 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.
>
> WDYT?
>
> Kind regards,
> Marcos
> -- 
> Marcos Caceres
> http://datadriven.com.au
>



Received on Monday, 20 July 2009 14:33:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:32 GMT