Re: Use cases for Range::createContextualFragment and script nodes

On Oct 21, 2010, at 1:06 AM, Olli Pettay wrote:

> On 10/21/2010 09:43 AM, Maciej Stachowiak wrote:
>> 
>> It is indeed not part of any standard. It was originally a Mozilla
>> vendor extension, later copied by Opera and Safari. We added support
>> for it in 2002 because at least at the time, some sites used it:
>> http://trac.webkit.org/changeset/2940
>> 
>> It should probably be added to a spec at some point. Perhaps Web DOM
>> Core could be expanded to cover Range&  Tranversal?
> 
> I'd actually like to get rid of it.
> So perhaps browsers could start warn about using it.
> (That ofc doesn't solve the problem Henri has atm.)

Even 8 years ago it was pretty frequently used by Web sites, and I would not expect things to be different now. Also, it is apparently used in a number of JavaScript libraries: <http://www.google.com/codesearch?as_q=createContextualFragment>

I suspect getting rid of createContextualFragment is not a practical option at this point. And I expect a new entrant to the browser market would likely have to implement it to achieve sufficient Web compatibility. So I think it should be spec'd.

Out of curiosity, though, what's the reason to get rid of it?

Regards,
Maciej

Received on Thursday, 21 October 2010 10:31:03 UTC