This new API allows users to get current caret position from a given screen point. The API returns a CaretPosition object which represents the caret position indicating current text insertion point including the containing DOM node, caret's character offset, and the client rectangle of caret range. The API also supports get CaretPosition inside Shadow DOM.
Gecko already implemented the API. Webkit/Blink didn't implement it. The interop risk is that it's unclear at this moment about Webkit's position on this. We won't be able to achieve full interop with this API if Webkit isn't willing to support this API. There is a compat risk too if we decided to deprecate the old API: https://crbug.com/690599
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
None
The API is tested for main DOM in WPT: https://github.com/web-platform-tests/wpt/blob/c18cfd4eb319ca535db8c194941719598b3b6ea8/css/cssom/caretPositionFromPoint.html Will add additional tests including cases for Shadow DOM scenario once https://github.com/w3c/csswg-drafts/issues/9932 is resolved.