You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per MDN it has been supported in Chrome and Safari for many years. While there is an alternative, I guess it should probably be in spec for web compatibility, although I haven't investigated its impact.
@foolip I see your comment in that mailing list. Per https://www.chromestatus.com/metrics/feature/timeline/popularity/387 the use count is 0.2% which is big enough and I doubt caretPositionFromPoint have lower use count given that it also has been there for years. What do you think, should we specify both?
It seems like the current situation is that Chromium and WebKit have caretRangeFromPoint while Gecko has caretPositionFromPoint.
Spec'ing caretRangeFromPoint and caretPositionFromPoint one in terms of the other in a way that would be trivial for all engines to support sounds like the best path forward to me.
There is a risk that these methods are used for UA detection, but other than that I don't see other risks.
Activity
saschanaz commentedon Jul 17, 2021
@foolip I see your comment in that mailing list. Per https://www.chromestatus.com/metrics/feature/timeline/popularity/387 the use count is 0.2% which is big enough and I doubt
caretPositionFromPoint
have lower use count given that it also has been there for years. What do you think, should we specify both?caretRangeFromPoint
return type should beRange | null
microsoft/TypeScript-DOM-lib-generator#1072saschanaz commentedon Jul 17, 2021
Oh, just found that
caretPositionFromPoint
is currently Firefox only, I guess it also needs a use counter then.saschanaz commentedon Jul 17, 2021
The WebKit implementation simply wraps
caretPositionFromPoint
, which has never been exposed...foolip commentedon Jul 20, 2021
It seems like the current situation is that Chromium and WebKit have
caretRangeFromPoint
while Gecko hascaretPositionFromPoint
.Spec'ing
caretRangeFromPoint
andcaretPositionFromPoint
one in terms of the other in a way that would be trivial for all engines to support sounds like the best path forward to me.There is a risk that these methods are used for UA detection, but other than that I don't see other risks.