W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2010

Re: [widgets] TWI: comments

From: Robin Berjon <robin@berjon.com>
Date: Mon, 8 Feb 2010 13:26:34 +0100
Cc: public-webapps <public-webapps@w3.org>
Message-Id: <C232D2C1-543E-43B9-A48A-D2D931A69D1E@berjon.com>
To: cyril.concolato@telecom-paristech.fr
On Feb 4, 2010, at 22:19 , Cyril Concolato wrote:
> * "A user agent whose start file implements [HTML5]'s Window  interface MUST ..."
> The start file does not implement anything. The user agent implements. I suggest to change it to something like:
> "User agent implementing the [HTML5]'s Window interface MUST ..."

You're mostly right, but I see where the original comes from. The UA may support Window but not expose it for all start files  e.g. it won't be there for a SWF start file. The resulting sentence is going to be clumsy no matter what :)

> * The step 1 in the initialization of the preference attribute algorithm which says "Establish the instance of a widget for this widget and create a storage area that is unique for the origin." should probably say "unique for the origin and for that instance."

I'm not sure what you mean? The preference storage should remain available across instantiations of the widget. This could probably be rephrased though.

> *In case two instances of the same widget package are loaded, modified (e.g. weather in Paris and in New York) and then closed, how does the UA retrieve the associated storage area when one is reloaded ? I don't think it can be specified but I think you should probably add a note saying that it is implementation specific, for example by asking the user what previous instance it want to start first.

This is a lifecycle issue. It's not clear that two instances of the same widget package loaded inside of the same UA is something that can even be described with the current specifications (though it can be implemented).

We've talked about a lifecycle spec that would flesh these things out, but there hasn't been much support (in terms of actually doing it).

Beyond that, I would expect it to work like loading the same page in two tabs.

> * What happens to the "storage" event fired by the setItem or removeItem methods when the UA does not implement the window object ?

I guess nothing!

> * What is the return value for the openURL method when there is a scheme handler associate to the IRI ? When there is none, the text says the method returns void. I think it also returns void so I wonder what's the point of the paragraph.

What you quote is in an "i.e.", i.e. it's a clarification for the reader. The normative statement that it clarifies is "the user agent must act as if the method had not been invoked".

> * The IDL spec indicates that the preference attribute implements the Storage interface, but I can't find a 'real' sentence saying it. I find:
> "Note: A user agent can  support the Storage interface on DOM attributes other than the preferences attribute (e.g., a user agent can to support the [WebStorage]  specification's localStorage attribute of the window object in conjunction to the preferences attribute)" but this is a note, hence not normative.
> 
> "Return the Storage  object associated with that widget instance's preferences attribute." but that's not really explicit.
> 
> "Implement the Storage  interface on the storage area, and make the preferences attribute a pointer to that storage area." but this isn't as clear as "The UA MUST support the Storage interface on the preferences attribute" or similar...
> 
> I suggest that you add an additional sentence.

Why? The WebIDL is normative, and we certainly don't want to reproduce all of the constraints it expresses in prose!

> Finally, can you clarify if the usage of getItem / setItem such as in widget.preferences.getItem('foo'); and widget.preferences.setItem('foo', 'dahut'); is allowed or if only the brackets notation (widget.preferences['foo']) is allowed. Maybe by adding an example ?

That's really up to the Web Storage specification (and WebIDL).

-- 
Robin Berjon - http://berjon.com/
Received on Monday, 8 February 2010 12:27:06 GMT

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