W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2009

[whatwg] Overriding functions in DOM Storage

From: Jeremy Orlow <jorlow@google.com>
Date: Tue, 26 May 2009 21:23:16 -0700
Message-ID: <5dd9e5c50905262123u6a989b5amb50c7ac31ac363d8@mail.gmail.com>
On Tue, May 26, 2009 at 8:28 PM, Aaron Boodman <aa at google.com> wrote:

> On Tue, May 26, 2009 at 8:17 PM, Jeremy Orlow <jorlow at google.com> wrote:
> > What's special here is that everything set with the implicit
> getters/setters
> > is supposed to be turned into a string.  So yes this does seem somewhat
> > unique.

Oh yeah, it's also a bit odd because values persist.  Which doesn't really
make sense if we allow functions to be overridden by functions, but does
make sense if we're overriding them with strings.

> > And yes, "there isn't good interop right now across the board"...but
> that's
> > one of the reasons the HTML 5 spec + WhatWG exist...right?  :-)
> Right I was just saying this is a bigger problem than this one API and
> makes sense to work on separately.

Isn't overriding defined in the spec?  If not, then I guess we need to split
this thread out.  :-)

Either way, I really think it's important that the "correct" behavior for
localStorage be spelled out.

> > I think it's important to decide which behavior makes the most sense and
> > standardize on it.  The way things are now is pretty useless to eveyone.
> Not useless. Overriding a host object's methods is pretty rare.

Well, useless in the sense that if everyone implements it differently, web
developers basically just have to avoid removeItem, setItem, clear, etc
altogether since they can't depend on any one behavior.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090526/7ec9ff97/attachment-0001.htm>
Received on Tuesday, 26 May 2009 21:23:16 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:12 UTC