- From: Koji Ishii <notifications@github.com>
- Date: Mon, 01 Jun 2015 19:13:35 -0700
- To: w3c/editing <editing@noreply.github.com>
Received on Tuesday, 2 June 2015 02:14:05 UTC
> Ok, but can we go ahead and add something like `Document.caretPositionFromPoint()` It's already in [CSS OM](http://www.w3.org/TR/cssom-view/#extensions-to-the-document-interface), what do you need to add? Though, I think, unlike `elementFromPoint()` which looks similar, `caretPositionFromPoint()` needs to know how to resolve ambiguous caret position, so I think it should belong to the selection spec. If this looks reasonable, can someone talk to CSS WG to see what they think? > and Document.getCaretPosition() to the spec, or do we have alternative proposals that will allow us to do the same thing? Isn't it a one-liner: ``` window.getSelection().getRangeAt(0).getBoundingClientRect() ``` or are you talking about something different? --- Reply to this email directly or view it on GitHub: https://github.com/w3c/editing/issues/56#issuecomment-107773533
Received on Tuesday, 2 June 2015 02:14:05 UTC