[whatwg] Request for new DOM property textarea.selectionText
ayg at aryeh.name
Sun Apr 29 00:38:26 PDT 2012
On Sun, Apr 29, 2012 at 10:29 AM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> That sounds like a tangential issue. We can easily extend execCommand to
> support arbitrary range(s) since such a feature is also valuable in richly
> editable areas.
Ranges don't exist in plaintext areas. How would you get a Range
object that selects text in a textarea? That's why we have separate
.selectionStart, .selectionEnd, etc. properties to start with.
> In this case, we have an API, namely document.execCommand, supported by two
> major browser engines (for years) that provides more or less the same
> functionality as the proposed API.
delete works in IE as well as WebKit. insertText (which is what would
be needed for this feature) is WebKit-only, in both plaintext and
More information about the whatwg