Hi all,

While trying to implement the widget interface spec [1], I found two typos:
- "a user agent can to support" => "a user agent can support"
- missing closing parenthese "in conjunction to the preferences attribute)".

I have also some remarks/questions:

* "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 ..."

* Section 5. is called "Widget Interface" but it starts by saying "The widget object provides 
...". It think it should say "Objects implementing the widget interface provide ..."

* 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."

* The spec says:
"When an object implementing the Widget interface is instantiated, if a user agent 
has not previously associated a storage area with the instance of a widget, then the user 
agent must initialize the preferences attribute."
What happens if the UA has already associated a storage area ? It should 
probably say that no initialization of the preferences attribute is made but 
the associated storage area can be used using the Storage interface, no ?

*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.

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

* 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.

* 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. Also, the given example is not 
really clear because it does not show the relationship between a config.xml 
document with preference elements and the associated script and storage.

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 ?

Regards,
Cyril

[1] http://www.w3.org/TR/2009/CR-widgets-apis-20091222/
--
Cyril Concolato
Maître de Conférences/Associate Professor
Groupe Mutimedia/Multimedia Group
Telecom ParisTech
46 rue Barrault
75 013 Paris, France
http://concolato.blog.telecom-paristech.fr/widgets/

Reply via email to