Skip to content

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

Notifications You must be signed in to change notification settings

michaelrhodes/text-content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages