W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2009

Re: propose an API to return Range in <textarea> etc. form control nodes (similar functionality as document.caretRangeFromPoint)

From: Xiaomei Ji <xji@chromium.org>
Date: Mon, 12 Oct 2009 09:37:32 -0700
Message-ID: <a7aebc750910120937x695d9119s9f53e2411778b5ea@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: Olli@pettay.fi, public-webapps@w3.org, sam@webkit.org, webkit-dev@lists.webkit.org
For a use case that pinpoint a word from a page, the context information
needed besides word might be the language that the word is in.And yes, as
you said, if the hit node is needed, elementFromPoint should do.


On Mon, Oct 12, 2009 at 1:08 AM, Anne van Kesteren <annevk@opera.com> wrote:

> On Fri, 09 Oct 2009 19:04:52 +0200, Xiaomei Ji <xji@chromium.org> wrote:
>> Maybe I should propose Document.wordFromPoint() which  directly returns
>> the word under the mouse (and handles both the DOM node and non-DOM form
>> control nodes).
>> It hides the information about the node and should be a useful API.
> Don't you need at least some context information as well besides just the
> word? Although I suppose you can get that using a combination of
> elementFromPoint and wordFromPoint...
> --
> Anne van Kesteren
> http://annevankesteren.nl/
Received on Monday, 12 October 2009 16:38:10 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:20 UTC