Skip to content

Text nodes

David Sveningsson requested to merge feature/text-nodes into master

Stores text nodes and makes it accessible using the textContent property on DOMNode. See also MDN description of textContent.

<div>
  foo <b>bar</b> baz
</div>

Accessing .textContent on the <div> would yield the string foo bar baz. To access individual text chunks or direct children only .childNodes can be used as previously (filter on nodeType being NodeTypes.TEXT_NODE or instance of TextNode).

Fixes #29 (closed).

Checklist

  • Changelog updated
  • Documentation updated
  • Change covered by a testcase
  • Commit history cleaned (no WIP, fixups, etc)
Edited by David Sveningsson

Merge request reports