node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…

text-content

A cross-browser function for getting and setting the text value of a DOM element.

text-content

text-content is a cross-browser function for getting and setting the text value of a DOM element.

npm install text-content
var text = require('text-content')
 
var span = document.createElement('span')
text(span, 'Some text')
 
console.log(text(span))
// => Some text 

It can also be used on the server with mkdom.

MIT