W3C home > Mailing lists > Public > www-dom@w3.org > April to June 1998

Re: Hello and NodeIterator Revisited

From: Ray Whitmer <ray@corel.com>
Date: Wed, 06 May 1998 13:07:40 -0600
Message-ID: <3550B4FC.BEFD38E3@corel.com>
To: www-dom@w3.org
Eric Vasilik wrote:

> What I have done is (when the insertion of the italic takes place) to
> query
> a propery of the iterator (I call it gravity) which has values left
> and
> right.  Iterators with left gravity scoot to the left of any new
> context,
> and iterators with right gravity scoot to the right of any new
> content.  Of
> course, this querying of gravity on iterators only needs to take place
> when
> it is ambiguous as to which way the iterator should go.  This way,
> whoever
> created the iterator can determine the behavior of the iterator in the
> presence of a changing document.

I agree that some want to scoot left and some right, but in my
experience it is generally relative to other iterator-like invisible
markers, and the order and way in which they were inserted, not in a
constant direction.

In my work, multiple markers that occur at the same position seem to
need a sub-order established relative to each other, and which way each
iterator scoots depends upon which side the inserting marker occurred
on, using the sub-order where the actual position is identical.  A
simple gravity flag does not automatically do the right thing most of
the time without complex gravity switching logic that seems to be
handled more simply by sub-ordering.

Ray Whitmer
Received on Wednesday, 6 May 1998 15:07:42 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:04 UTC