Re: Hello and NodeIterator Revisited

At 09:17 AM 5/4/98 -0400, Don Park wrote:
>ECMAScript is a scripting language which differs greatly from general
>languages in terms of target audience and intended use.  If DOM is intended
>to be easy to use, I would like to see DOM API designed specifically
>designed for scripting languages so that the script writers will not have to
>know what an iterator is. 

This is why NodeIterator has the "collection" semantics allowing array-like
random access to iterators.  The intent is to allow ECMAScript implementers
to bind these methods to the "square bracket" syntax in ECMAScript.  In
other words, you're right that script writers won't tend to know what an
iterator is, but will use them implicitly whenever they reference a
"collection" of objects such as are allowed in the current Dynamic HTML
APIs.  

One problem, possibly fatal, that has come to light is that this would
generate a new iterator for every subscript reference.  It was discussed in
Melbourne (but I wasn't there), and the whole NodeIterator issue will be
revisited in the WG teleconference this Wednesday.  So, we're listening,
and we'll try to come up with improvements to the spec that meet the needs
you and others have expressed, and I'll DEFINITELY put more language in the
spec explaining why things are done the way they are, try to clarify common
misconceptions, how to work around known limitations, etc.

Mike

Received on Monday, 4 May 1998 10:02:51 UTC