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: Ehsan Akhgari <ehsan@mozilla.com>
Date: Tue, 6 Jan 2015 17:48:05 -0500
Message-ID: <CANTur_6hCtErB=Tmuqwj+-NrTouTftbdb8ngvMV8t8m5_54tiA@mail.gmail.com>
To: Olli Pettay <olli@pettay.fi>
Cc: Webapps WG <public-webapps@w3.org>
On Tue, Jan 6, 2015 at 5:44 PM, Olli Pettay <olli@pettay.fi> wrote:

> On 01/07/2015 12:32 AM, Ryosuke Niwa wrote:
>
>> https://github.com/w3c/selection-api/issues/40
>>
>> Trident (since IE10) and Gecko both return a live Range, which can be
>> modified to update selection.  WebKit and Blink both return a clone Range
>> so that any changes to the Range doesn't update the selection.
>>
>> It appears that there is a moderate interest at Mozilla to change Gecko's
>> behavior.  Does anyone have a strong opinion about this?
>>
>
>
> I don't have a strong opinion on this, although live Range can be rather
> nice thing when one wants to change the selection.
> But implementing the live-ness properly can be somewhat annoying - except
> that engines need to internally track DOM mutation inside
> selection anyway, so maybe not so bad after all.
> Perhaps speccing the special cases (like when one makes Range to point to
> detached dom subtree) would be enough?
>
> But as I said, I don't have strong feelings about this.


I would be open to changing Gecko's behavior here (assuming that it would
be Web compatible.)
Received on Tuesday, 6 January 2015 22:49:14 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:25 UTC