[whatwg] Overriding functions in DOM Storage

On Thu, Jun 11, 2009 at 12:36 PM, Jeremy Orlow <jorlow at google.com> wrote:

> On Thu, Jun 11, 2009 at 11:52 AM, Ian Hickson <ian at hixie.ch> wrote:
>
>> On Fri, 22 May 2009, Jeremy Orlow wrote:
>> >
>> > What is the behavior of the following supposed to be?
>> >
>> > window.sessionStorage.removeItem = function(x) { alert("Wait, this
>> works?"); };
>> > window.sessionStorage.removeItem('blah');
>> > alert(typeof window.sessionStorage.removeItem);
>>
>> The behaviour of these things are defined in WebIDL:
>>
>>   http://dev.w3.org/2006/webapi/WebIDL/
>>
>> ...which, as defined today, consists of setting 'removeItem' to a function
>> value that doesn't persist.
>
>
> Apologies.  I have looked through that, but apparently not closely enough.
>  The relevant portions of the HTML 5 spec + all the specs it depends on is a
> lot to grok...hence the occasional question like this.
>
> Thanks for the response!
>

Also, does this mean that setting removeItem to null is ok?  What about
other (non-function) objects?

What specific portion of WebIDL talks about this?  I'm having trouble
finding it.

Thanks,
J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090611/75c62907/attachment.htm>

Received on Thursday, 11 June 2009 14:05:18 UTC