Ian Hickson wrote:
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.
  
Sorry, I don't follow what you mean. The loop is possible of course, but what should the result be? If I have a sessionStorage object |s| with 10 items, the length will be 10. Should I expect |s[i]| for i=0,..., 9?  If so what will be the result, keys? items? Can I set values, eg s[2] = "howdy"?
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.
  
Actually I take it back. The current document at the URL above only uses enumerating once, and there is qualified by properties. I was given a quote from an earlier document I suppose.

Thanks,
jjb


Reply via email to