inner-text-shim

1.0.1 • Public • Published

inner-text-shim

innerText shim for browsers, that don't support it.

This module is meant to use in the browser with browserify. if you need a polyfill, use: innerText-polyfill

usage

all innerText does is get the el.innerText from the element, even when the browser does not support it. you can't set the innerText with this module.

var innerText = require('inner-text-shim');
var el = document.querySelector('body');
el.innerHTML = '<p>hello</p><br/>welt'
 
var text = innerText(el)
 
 
/* text ->
"hello
 
 
welt"
/*

license

MIT

credit

Readme

Keywords

Package Sidebar

Install

npm i inner-text-shim

Weekly Downloads

219

Version

1.0.1

License

MIT

Last publish

Collaborators

  • andineck