Re: [whatwg] Proposal: Add HTMLElement.innerText

2010-08-14 Thread Adam Barth
On Sat, Aug 14, 2010 at 11:18 PM, Robert O'Callahan wrote: > On Sun, Aug 15, 2010 at 6:16 PM, Robert O'Callahan > wrote: >>  Wouldn't you consider the interoperability benefits to the Web platform? > > Not to mention the benefit of simplifying the platform a tiny bit by > removing a feature which

Re: [whatwg] Proposal: Add HTMLElement.innerText

2010-08-14 Thread Robert O'Callahan
On Sun, Aug 15, 2010 at 6:16 PM, Robert O'Callahan wrote: > Wouldn't you consider the interoperability benefits to the Web platform? > Not to mention the benefit of simplifying the platform a tiny bit by removing a feature which mostly duplicates another much more well-known feature. Rob -- "N

Re: [whatwg] Proposal: Add HTMLElement.innerText

2010-08-14 Thread Robert O'Callahan
On Sun, Aug 15, 2010 at 5:57 PM, Adam Barth wrote: > On Sat, Aug 14, 2010 at 10:14 PM, Robert O'Callahan > wrote: > > On Sun, Aug 15, 2010 at 12:17 PM, Adam Barth wrote: > >> That's difficult to say given that it's supported in most browsers. > >> We'd need to look for folks complaining to Mozi

Re: [whatwg] Proposal: Add HTMLElement.innerText

2010-08-14 Thread Adam Barth
On Sat, Aug 14, 2010 at 10:14 PM, Robert O'Callahan wrote: > On Sun, Aug 15, 2010 at 12:17 PM, Adam Barth 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 >

Re: [whatwg] Proposal: Add HTMLElement.innerText

2010-08-14 Thread Robert O'Callahan
On Sun, Aug 15, 2010 at 12:17 PM, Adam Barth 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 > , but none

Re: [whatwg] Proposal: Add HTMLElement.innerText

2010-08-14 Thread Adam Barth
On Sat, Aug 14, 2010 at 5:04 PM, Ian Hickson wrote: > On Sat, 14 Aug 2010, Adam Barth wrote: >> We should expose a property on HTMLElement similar to innerHTML called >> innerText.  When assigning a string to innerText, the string is placed >> in a text node (and is not parsed as HTML). > > How wo

Re: [whatwg] Proposal: Add HTMLElement.innerText

2010-08-14 Thread Ian Hickson
On Sat, 14 Aug 2010, Adam Barth wrote: > > We should expose a property on HTMLElement similar to innerHTML called > innerText. When assigning a string to innerText, the string is placed > in a text node (and is not parsed as HTML). How would this differ from textContent? > HTMLElement.innerT

Re: [whatwg] Proposal: Add HTMLElement.innerText

2010-08-14 Thread Mike Wilcox
Wow, I was just thinking of proposing this myself a few days ago. In addition to Adam's comments, there is no standard, stable way of *getting* the text from a series of nodes. textContent returns everything, including tabs, white space, and even script content. BTW, I haven't checked, but I re

[whatwg] Proposal: Add HTMLElement.innerText

2010-08-14 Thread Adam Barth
== Use Case == It's common that a web page has a string of untrusted characters (e.g., received via cross-site XMLHttpRequest or postMessage) that it wishes to display to the user. The page wants to display the string using a simple, secure API. == Workarounds == Currently, the path of least re