- From: Jarek Foksa via GitHub <sysbot+gh@w3.org>
- Date: Tue, 12 Jul 2016 12:41:32 +0000
- To: public-svg-issues@w3.org
jarek-foksa has just created a new issue for https://github.com/w3c/svgwg: == 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 too me. The`textContent` includes both rendered and non-rendered characters, which means the characters inside `<title>`, `<desc>` or `<tspan style="display: none">` would be counted as well. I would first spec SVGElement.innerText, in a similar fashion to [HTMLElement.innerText](https://rocallahan.github.io/innerText-spec/) and then update the definition of `getNumberOfChars()` to rely on `innerText` rather than `textContent`. Please view or discuss this issue at https://github.com/w3c/svgwg/issues/200 using your GitHub account
Received on Tuesday, 12 July 2016 12:41:43 UTC