Bug #2998
node.textContent will not output contents of its children
Status: | Fixed | Start date: | 02/07/2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 100% | ||
Category: | API | |||
Target version: | - | |||
Found in version: | 4.10.37.g41bb3 | Platform: | Linux |
Description
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.
Example:Foo<span>Bar</span>
node.textContent should read: FooBar
In Movian that'll be only Foo
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
Associated revisions
ecmascript: Make element.textContent behave as it should
Fixes #2998
History
#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.