1.0.0 • Published 4 years ago

fallentext v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

npm Node.js CI

🍂fallentext

A mimic implementation of HTMLElement.innerText

Important notes:

  • Does not take CSS styling or layout into account .
  • Treats <title> value as text, if given <html> as the root node.
  • Treats alt attribute values as text.
  • Treats SVG <title>, <desc>, <text> values as text, regardless if contained in <defs>.
  • Treats MathML <mtext> values as text.
  • Can be used with jsdom, for use with Node.js