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

[whatwg] Storage.getItem() question

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 24 May 2006 15:53:04 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0605241551570.22058@dhalsim.dreamhost.com>
On Thu, 4 May 2006, Johnny Stenback wrote:
> --
> The getItem(key) method must return the StorageItem object representing the
> key/value pair with the given key. If the given key does not exist in the list
> associated with the object, or is not accessible, then this method must return
> null. Subsequent calls to this method with the same key must return different
> instances of the StorageItem  interface.
> --
> The first sentence makes sense, but the last one conflicts with the 
> first one and doesn't make sense to me. Why would each call to getItem() 
> for the same key need to return a separate instance of the StorageItem 
> interface?

I just tried to fix this by saying that it should always return the same 
object, except when the script is from another security context, but I 
have no idea what that means. Could you provide me with a definition that 
exactly matches what Mozilla actually does? (From a JS point of view, not 
from the C++ point of view.)

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 24 May 2006 08:53:04 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:46 UTC