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: Anne van Kesteren <annevk@opera.com>
Date: Tue, 27 Oct 2009 16:31:50 +0100
To: "Xiaomei Ji" <xji@chromium.org>, "Maciej Stachowiak" <mjs@apple.com>
Cc: Olli@pettay.fi, public-webapps@w3.org, sam@webkit.org, webkit-dev@lists.webkit.org
Message-ID: <op.u2gtfcg364w2qv@anne-van-kesterens-macbook.local>
On Fri, 16 Oct 2009 20:20:00 +0200, Xiaomei Ji <xji@chromium.org> wrote:
> 1. Why we would like to differentiate whether the node is a 'document'  
> node or a 'control' node? Can such differentiation be achived by  
> existing flags in node instead of "offsetKind"?

Yes. I think we should nuke offsetKind for now.


> 2. If we expose the control node, how to deal with the concerns Olli  
> raised?
> "Do you really want to expose those (native) anonymous DOM nodes to
> web? What should happen if one tries to append them to normal DOM?
> Or removes them? Or adds (mutation) event listener to them?"

You get a numeric offset, not any kind of object.


> 3. From user's point of view, I think we probably need to have a  
> convenience
> method for converting a Range, and it probably should not give null for a
> control position. We would need both the node and the offset for further
> processing.

If we have a convenience access to a Range it would have to be null for  
replaced elements that contain anonymous line boxes. Is that really needed  
though?


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Tuesday, 27 October 2009 15:32:40 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:34 GMT