Skip to content

[cssom-view] Remove caret range concept from CaretPosition interface #10230

Closed
@siliu1

Description

@siliu1

Current spec for CaretPosition interface has a caret range concept which is a live range. The caret range is only used to get the client rect of the CaretPosition. We should avoid creating the live range upfront because:

  1. the live range is not used at all except for getting client rect.
  2. Maintain live range can be expensive during DOM mutation.
  3. No browsers implemented the algorithm by creating live range upfront. (Firefox and Chromium both create a live range only when CaretPosition::getClientRect() is invoked.)

Propose to remove caret range concept from CaretPosition interface.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions