W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2012

[whatwg] Request for new DOM property textarea.selectionText

From: David Young <dyoung@pobox.com>
Date: Sun, 29 Apr 2012 22:24:40 -0500
Message-ID: <20120430032440.GW20070@pixotech.com>
On Sun, Apr 29, 2012 at 02:10:14PM -0700, Maciej Stachowiak wrote:
> Aryeh is referring to the DOM Range interface, which can only apply to
> nodes that are directly in the DOM, and offsets into their text. The
> text contents of an <input> or <textarea> are not properly in the DOM,
> so you cannot use a DOM Range to reference such ranges. I am no sure
> this is what Ryosuke had in mind though; I think he just meant that
> in general we could support some notion of a range, and presumably we
> could come up with one that applies to contentEditable/designMode as
> well as to text controls. One extreme possibility is to simply change
> the definition of Range to allow it to address the contents of text
> input controls.

Ok, I am a little bit familiar with the DOM Range interface.

It seems that the text contents of a <textarea>, at least, could be
properly in the DOM?  I see that an <input> uses a value attribute
instead of a subordinate text node, so I suppose DOM Range may be less
sensible and/or more difficult to apply there.

If Ryosuke wants to use one API to address ranges of text be they part
of a text control or not, then that makes sense to me.

Dave

-- 
David Young
dyoung at pobox.com    Urbana, IL    (217) 721-9981
Received on Sunday, 29 April 2012 20:24:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:07 GMT