[svgwg] Issue: Update getNumberOfChars() definition marked as Text chapter

AmeliaBR has just labeled an issue for https://github.com/w3c/svgwg as
 "Text chapter":

== Update getNumberOfChars() definition ==
The current definition of 
[getNumberOfChars()](https://svgwg.org/svg2-draft/single-page.html#text-__svg__SVGTextContentElement__getNumberOfChars)
 method is as follows:

> The getNumberOfChars method is used to determine the total number of
 characters available for rendering within the current element. When 
getNumberOfChars() is called, the following steps are run:
> 
> 1. Let text be the result that would be obtained from getting the 
textContent IDL attribute on the current element.
> 2. Return the length of text. 

This does not look right to me. The`textContent` includes characters 
inside never-rendered elements such as `<title>`, `<desc>` or `<tspan 
style="display: none">`. Those characters should not be counted.

I would first spec `SVGElement.innerText` in a similar fashion to 
[HTMLElement.innerText](https://rocallahan.github.io/innerText-spec/) 
and then I would update the definition of `getNumberOfChars()` to rely
 on `innerText` rather than `textContent`.

See https://github.com/w3c/svgwg/issues/200

Received on Tuesday, 12 July 2016 17:01:19 UTC