Intent to Deprecate and Remove: Text.replaceWholeText()

116 views
Skip to first unread message

Philip Jägenstedt

unread,
Nov 17, 2014, 2:17:56 PM11/17/14
to blink-dev

Primary eng (and PM) emails

phi...@opera.com


Summary

Remove the Text.replaceWholeText() method, which removes adjacent text nodes and sets the text of the one that remains.


Motivation

It as been tentatively removed from the DOM Standard:

https://dom.spec.whatwg.org/#dom-text-replacewholetext


Compatibility Risk

Any scripts using it will throw exceptions after the method is gone.


Alternative implementation suggestion for web developers

Sometimes, textContent on the parentNode is OK. If not, call parentNode.normalize() and then replace the text of the only Text node that should remain.


Usage information from UseCounter

https://www.chromestatus.com/metrics/feature/timeline/popularity/100


That's 0% every day except March 20, when it was 0.0001%.


Entry on chromestatus.com, crbug.com, or MDN

https://developer.mozilla.org/en-US/docs/Web/API/Text.replaceWholeText


Requesting approval to remove too?

Yes. Usage is ~0 so ~0 people would see a deprecation message.

Chris Harrelson

unread,
Nov 17, 2014, 8:54:22 PM11/17/14
to Philip Jägenstedt, blink-dev
Looks like Firefox has already removed it?

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Boris Zbarsky

unread,
Nov 17, 2014, 9:32:10 PM11/17/14
to blink-dev
On 11/17/14, 8:53 PM, Chris Harrelson wrote:
> Looks like Firefox has already removed it?

As far as I can tell, Gecko (and hence Firefox) never had this
implemented at all.

-Boris

Jochen Eisinger

unread,
Nov 18, 2014, 9:29:47 AM11/18/14
to Boris Zbarsky, blink-dev
lgtm

Dimitri Glazkov

unread,
Nov 18, 2014, 11:01:42 AM11/18/14
to blink-dev
LGTM2

Chris Harrelson

unread,
Nov 18, 2014, 12:57:03 PM11/18/14
to Dimitri Glazkov, blink-dev
LGTM3

LGTM2
Reply all
Reply to author
Forward
0 new messages