[whatwg] Proposal: Add HTMLElement.innerText

Maciej Stachowiak mjs at apple.com
Mon Aug 16 02:23:55 PDT 2010


On Aug 14, 2010, at 10:14 PM, Robert O'Callahan wrote:

> On Sun, Aug 15, 2010 at 12:17 PM, Adam Barth <w3c at adambarth.com> wrote:
> That's difficult to say given that it's supported in most browsers.
> We'd need to look for folks complaining to Mozilla.  There's a tree of
> duplicate bug reports that lead to
> <https://bugzilla.mozilla.org/show_bug.cgi?id=264412>, but none since
> 2006.  In 2006, you said you'd probably add it to HTML5:
> https://bugzilla.mozilla.org/show_bug.cgi?id=343357#c2.  :)
> 
> I doubt that IE or WebKit will remove support at this point, which
> leaves this as an inviting interoperability trap for developers who
> don't test in every browser.
>  
> If it's not needed for compatibility, why wouldn't Webkit consider removing it?

We'd probably weigh the following factors:

- Is it likely WebKit-specific content relies on it?
    Probably yes.
- Is it a genuinely useful feature? 
    Yes, the ability to get plaintext content as rendered is a useful feature and annoying to implement from scratch. To give one very marginal data point, it's used by our regression text framework to output the plaintext version of a page, for tests where layout is irrelevant. A more hypothetical use would be a rich text editor that has a "convert to plaintext" feature. textContent is not as useful for these use cases, since it doesn't handle line breaks and unrendered whitespace properly.
- Do other browsers implement it?
    Seems like all but Firefox do.

These factors would tend to weigh against removing it.


On Aug 14, 2010, at 11:16 PM, Robert O'Callahan wrote:
>  Wouldn't you consider the interoperability benefits to the Web platform?


We do consider this, but since the status quo is "every browser but Firefox implements it", it's not clear that flipping WebKit-based browsers from one column to the other is a genuine interoperability improvement. Nor does it seem clear that changing all other browsers to match the odd man out is even the best overall strategy to getting there.

Regards,
Maciej

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100816/cb001410/attachment-0002.htm>


More information about the whatwg mailing list