[whatwg] Overriding functions in DOM Storage

Jeremy Orlow jorlow at google.com
Tue May 26 21:23:16 PDT 2009

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-0002.htm>

More information about the whatwg mailing list