Standardizing innerText


See - innerText is a nice property for getting HTMLElement text as presented, the same as you would get when selecting the element. Its behavior should be standardized (and implemented in Firefox).

Previous standardization attempts (as linked):


To do this right, you would first have to standardize selection. There have been some attempts, but not successes.

Standardizing selection content

I think, more than / before specifying selection behavior, it’s crucial to specify plain-text style normalization behavior, which would then be used as part of selection behavior (which also entails things like element boundaries and such, which, while important, don’t affect the behavior of innerText).

CSS Plain-Text Conversion

See also:


I have created a proposed spec plus testsuite here:

1 Like