- From: Brady Eidson <beidson@apple.com>
- Date: Sun, 18 May 2008 15:18:51 -0700
A little while ago, this change - http://html5.org/tools/web-apps-tracker?from=1429&to=1430 - was meant to "update the spec for consistency with WebIDL" In this change, the following passage was removed from the Storage section: "In the ECMAScript DOM binding, enumerating a Storage object must enumerate through the currently stored keys in the list the object is associated with. (It must not enumerate the values or the actual members of the interface). In the ECMAScript DOM binding, Storage objects must support dereferencing such that getting a property that is not a member of the object (i.e. is neither a member of the Storage interface nor of Object) must invoke the getItem() method with the property's name as the argument, and setting such a property must invoke the setItem() method with the property's name as the first argument and the given value as the second argument." Shorty thereafter, the declaration of the Storage interface was changed to the following: interface Storage { readonly attribute unsigned long length; [IndexGetter] DOMString key(in unsigned long index); [NameGetter] DOMString getItem(in DOMString key); [NameSetter] void setItem(in DOMString key, in DOMString data); [XXX] void removeItem(in DOMString key); void clear(); }; I assumed that the WebIDL descriptions of [IndexGetter], [NameGetter], and [NameSetter] would keep the specified functionality in tact, but it appears this is *not* the case. Or by reading http://dev.w3.org/2006/webapi/Binding4DOM/ I can't find where it is the case... Does someone know what is up with this? While I'm on the topic, I'm also curious about that [XXX] placeholder. There's a bug in WebKit's bugzilla pointing out that the IE8 beta and Firefox 2 both support `delete storage.keyName` syntax as an alias for `storage.removeItem(keyName)` I'm taking a guess here and assuming supporting the `delete` syntax is the implied concept behind [XXX] Not that this mailing list has direct impact on the WebIDL spec, but I would suggest [NameDeleter] or [NameRemover] as a placeholder in the HTML5 spec since it fits in with the NameGetter/Setter family of operations quite nicely. ~Brady
Received on Sunday, 18 May 2008 15:18:51 UTC