Closed dsanghan closed 5 years ago
@dsanghan Hey there, unfortunately I don't think that there is a way to add inneText
to HTMLKit without introducing a CSS-capable rendering engine.
You see, this attribute works the way you want it to only when combined with a user agent that interprets CSS and know which elements are rendered and which are not.
According to the spec innerText
behaves the same way as textContent
for non-CSS user agents, which HTMLKit is.
I'll close this, since it is out of scope for HTMLKit. However, please feel free to reopen if you have any suggestions/ideas to make this work.
Would be great if we could get support for https://www.w3schools.com/jsref/prop_node_innertext.asp
Example html: nbsp.zip
Text Content shows
nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp;
on a hidden div.Inner Text is much cleaner: