- From: Nikos Andronikos via GitHub <sysbot+gh@w3.org>
- Date: Sun, 07 Aug 2016 10:59:52 +0000
- To: public-svg-issues@w3.org
nikosandronikos has just labeled an issue for https://github.com/w3c/svgwg as "DoC_noResponse": == 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>` and `<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 Sunday, 7 August 2016 11:00:00 UTC