node.textContent will not output contents of its children
|Assignee:||Andreas Smas||% Done:|
|Found in version:||4.10.37.g41bb3||Platform:||Linux|
I don't really know whether this is a Movian or Gumbo issue, so I'll just leave it here.
According to W3 DOM textContent property specification: "This attribute returns the text content of this node and its descendants", and it really does in each and every browser.
However, in Movian this property returns only the element's text nodes, and doesn't include text nodes of its descendants.
node.textContent should read:
In Movian that'll be only
Easy to reproduce with the following snippet:
var test = "<div id='test'>Foo<span>Bar</span></div>", parsed = html.parse(test); showtime.print(parsed.root.getElementById('test').textContent); //Foo
ecmascript: Make element.textContent behave as it should
#1 Updated by Wain . over 7 years ago
I have updated Movian to the latest build (4.99.704.g872d4), still this bug is present. It's quite hard to use new DOM parser because of this issue.
#2 Updated by Andreas Smas over 7 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset git|65fd24bababb95285b9cad403c39159c8b0b89aa.