0.0.3 • Published 10 years ago

text-content v0.0.3

Weekly downloads
1,648
License
MIT
Repository
github
Last release
10 years ago

text-content

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

Build status

Browser support

Install

npm install text-content

Example

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.

License

MIT