W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2008

[whatwg] <ins>, <del>, and <mark> crossing element boundaries

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Wed, 02 Apr 2008 18:19:53 +0200
Message-ID: <47F3B229.2000308@disruptive-innovations.com>
Nicholas Shanks wrote:

> Hi Daniel.
> You've obviously had these issues on your mind a long time.

Oh, 16 years only... :-)

> What is the benefit of the @start attribute on the ending tag? Shouldn't 
> the @end attribute be sufficient. I fear that if you let HTML authors 
> loose with something like this they'll end up with mis-matching pairs, 
> and while still able to create those (e.g. two start tags ending at the 
> same ID; or pointing to non-extant IDs) the surface area for error is 
> greater if the end tag has to be the inverse of the start tag too.

Yes, the end attribute is enough to style data. Having cross-links
between the elements is really helpful for instance when you place the
caret right after the end tag, move the caret to the left to reach that
end tag, and you want to offer the possibility to cancel the deletion
of that portion of text. Retrieving the start tag is then easier than
a dom traversal... But I see your point about possible mismatched pairs.

</Daniel>
Received on Wednesday, 2 April 2008 09:19:53 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:40 UTC