[whatwg] WebIDL vs HTML5 storage changes

On Tue, May 20, 2008 at 3:50 PM, Maciej Stachowiak <mjs at apple.com> wrote:

>
> On May 19, 2008, at 4:54 PM, Robert O'Callahan wrote:
>
>  If "storage.keyName = 'value';" can create a new storage item
>> (persistently), won't authors expect "delete storage.keyName;" to remove it
>> (persistently), as a matter of consistency?
>>
>> If overloading "delete" is too quirky or too hard to implement, then it
>> seems none of the other shorthands should be allowed either.
>>
>
> Many objects in the DOM implement custom name getters (for instance
> NodeList) and a few even implement custom name setters (CSSStyleDeclaration,
> at least the way it is done in WebKit) but no one has clamored for a custom
> deleter or expected delete to work "as a matter of consistency" or been
> confused that "style.opacity = 0" is allowed but "delete style.opacity" is
> not. So I would say the available evidence argues against your conclusions.
>

I think 'style' does not bear on my conclusions, since 'style' has custom
property getters and setters, but not *adders* --- "style.foobar = ...;"
does not trigger any DOM API. Storage is different, it is something new.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080521/ff66bf29/attachment.htm>

Received on Tuesday, 20 May 2008 14:56:06 UTC