W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

Re: [Selection] Should selection.getRangeAt return a clone or a reference?

From: Mats Palmgren <mats@mozilla.com>
Date: Wed, 14 Jan 2015 16:14:36 +0000
Message-ID: <54B695EC.3080205@mozilla.com>
To: Aryeh Gregor <ayg@aryeh.name>
CC: Ryosuke Niwa <rniwa@apple.com>, Koji Ishii <kojiishi@gmail.com>, Webapps WG <public-webapps@w3.org>
On 01/09/2015 12:40 PM, Aryeh Gregor wrote:
> The advantage of the IE/Gecko behavior is you can alter the selection
> using Range methods.  The advantage of the WebKit/Blink behavior is
> you can restrict the ranges in the selection in some sane fashion,
> e.g., not letting them be in detached nodes.

It would be easy to change Gecko to ignore addRange() calls if the
range start/end node is detached.  We could easily do the same for
range.setStart*/setEnd* for ranges that are in the Selection.
Would that address your concern about detached nodes?

Received on Wednesday, 14 January 2015 16:15:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:43 UTC