jkd
06-23-2003, 12:23 AM
Primary intention would be sorting. Ultimately, in-place modification of the list requires setters for the items in it. A NodeList doesn't have setters, but an HTMLOptionsCollection does. :)
An example of this is here:
http://www.jasonkarldavis.com/select.xhtml
Notice the issues associating with shifting and unshifting. I have a few theories on why it can pop and push but not shift and unshift, but nothing I feel comfortable putting my voice behind yet.
Gecko-only, btw. As always. Just some food for thought mainly.
Implications of this:
Anything that provides Array index-like accessors can use Array methods
But only collections with setters on individual items can be modified in place (sorting, popping, etc)
An example of this is here:
http://www.jasonkarldavis.com/select.xhtml
Notice the issues associating with shifting and unshifting. I have a few theories on why it can pop and push but not shift and unshift, but nothing I feel comfortable putting my voice behind yet.
Gecko-only, btw. As always. Just some food for thought mainly.
Implications of this:
Anything that provides Array index-like accessors can use Array methods
But only collections with setters on individual items can be modified in place (sorting, popping, etc)