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