Hi Marcos,
Le 08/02/2010 16:56, Marcos Caceres a écrit :
On Thu, Feb 4, 2010 at 10:19 PM, Cyril Concolato
* 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 ?
Right, I've adapted your text to read:
"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.
If a user agent has previously associated a storage area with a widget
instance, the user agent must not re-initialize the preferences
attribute unless explicitly requested to do so by the end-user or for
security reasons. Instead, the previously associated storage area (or
an equivalent clone) can be accessed using the Storage interface."
Does that make any sense?
Yes it does.
... hmm... seems that Storage is tied to Window... bah. This goes back
to my previous email [1] about the window object. I think we need to
just bite the bullet and just put the Window dependency in :(
See my answer to Robin, I'm not sure to understand the benefits of that choice.
* 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.
Right. This whole openURL section needs a minor clean-up: there is a
bit or redundancy there. Let me work on that an get back to the WG.
Thanks.
* 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.
Well spotted! The definition of preference now reads:
"The preferences allows authors to manipulate a storage area that is
unique for the instance of a widget. It does this by implementing the
Storage interface specified in [WebStorage]."
Good.
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.
That's a good point. I've added another example to the spec. Can you
please take a look?
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 ?
As of WebIDL , I believe the notations are equivalent. Regardless, I
have added an example. Please see the spec.
Can you point me to the right place because I can't find the new examples in:
http://dev.w3.org/2006/waf/widgets-api/
Regards,
Cyril
--
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/