[whatwg] Fw: Lists, <ins>/<del>, and <a>

Alexey Feldgendler alexey at feldgendler.ru
Tue Aug 29 21:18:16 PDT 2006

On Wed, 30 Aug 2006 10:57:51 +0700, Andrew Fedoniouk <news at terrainformatica.com> wrote:

>>> Probably, lists should implement a special DOM interface which allows to
>>> iterate over the list items. Tables have such an interface.

> Why not to implement just one simple function:
>   function foo(element) { ... }
>  ...
>  someListElement.select( "li", foo);
>  -or-
>  someListElement.select( "li:not(li li)", foo);
>   instead of multiplying that interfaces?

This is guessing. Right now, it took you two attempts to construct a selector which doesn't match too many or too little nodes. Note that rules may change in the future. For example, there has been a proposal to allow OL and UL as direct descendants of other OL or UL -- if this is accepted, you'll need to update your selectors once again, making them still more complex.

On the other hand, the list can be required to "know" what its items are.

Alexey Feldgendler <alexey at feldgendler.ru>
[ICQ: 115226275] http://feldgendler.livejournal.com

More information about the whatwg mailing list