package
A cross-browser function for getting and setting the text value of a DOM element.
npm install text-contentGitHub-flavored package documentation.
Across all versions, last 30 days.
4,992 in 30 days
Runtime metadata.
Tagged topics.
text-content is a cross-browser function for getting and setting the text value of a DOM element.
npm install text-contentvar text = require('text-content')
var span = document.createElement('span')
text(span, 'Some text')
console.log(text(span))
// => Some textIt can also be used on the server with mkdom.