[Editing] Replacing `targetRanges` on `InputEvent` by `getTargetRanges`

Hi all,

We discussed about replacing `targetRanges` on `InputEvent` by `getTargetRanges` because an event listener of `beforeinput` event can mutate DOM and a subsequent event listener can receive a bad range.  There was another concern about the cost of computing the range upfront at the event dispatching time.

However, it looks like `targetRanges` is almost always NULL except when `replaceContent` is used for spelling correction, etc... so perhaps we don't need to make this change.

Do you remember any other reason why we needed a method instead?

- R. Niwa

Received on Saturday, 9 January 2016 23:50:57 UTC