dom icon indicating copy to clipboard operation
dom copied to clipboard

Add extend and modify methods for the Range object

Open snnsnn opened this issue 1 year ago • 0 comments

What problem are you trying to solve?

Please can you add extend and modify methods to the specification of the Range object in a way to reflect the same behavior as the Selection API.

We use Range API in our product to run DOM Rect calculations in tight loops for DOM measurements, highlight and typography, fitting and slicing text, but it is very cumbersome and sub-optimal to execute those task in user space code. These two methods will come handy for other task too, such as in browser code editors.

It will also close the gap between Selection and Range API as I see there are similar issues:

  • https://github.com/whatwg/dom/issues/431
  • https://github.com/whatwg/dom/issues/772

Thank you.

What solutions exist today?

No response

How would you solve it?

No response

Anything else?

No response

snnsnn avatar Mar 14 '24 18:03 snnsnn