W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2009

Re: Storage 'length' and enumeration

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 28 Apr 2009 21:39:33 +0000 (UTC)
To: "John J. Barton" <johnjbarton@johnjbarton.com>
Cc: public-webapps@w3.org
Message-ID: <Pine.LNX.4.62.0904282137470.12381@hixie.dreamhostps.com>
On Tue, 28 Apr 2009, John J. Barton wrote:
> Hi. I work on Firebug, a web page debugger for Firefox 
> (http://getfirebug.com).
> In attempting to show developers relevant information about all objects 
> in their program I was trying to display window.sessionStorage. In the 
> process I read the document http://dev.w3.org/html5/webstorage/. I found 
> the document unnecessarily confusing because it uses the property 
> 'length' for Storage. This is the same property used by Javascript Array 
> type, but Storage is not an array and you cannot enumerate the elements 
> of the Storage object |s| using
>   for(var i = 0; i < s.length; i++)...

This is in fact possible.

> Using the term "enumeration" to mean "property enumeration" is also 
> confusing, but I suppose ECMA script made that mistake too long ago.

I'm just following WebIDL's terminology here.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 28 April 2009 21:40:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:12:53 UTC