Skip to content

imbugs/script-inner-html

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

script-inner-html

dangerouslySetInnerHTML that evaluates <script> tags, improve dangerously-set-inner-html , add <script src=""> support

install

npm install --save script-inner-html

usage

const React = require('react');
const InnerHTML = require('script-inner-html')

const html = `
  <div id="root"></div>
  <script>
    window.alert('hello from script-inner-html');
  </script>
`

module.exports = () => {
  return (
    <InnerHTML html={html} />
  );
};

license

MIT

About

dangerouslySetInnerHTML that evaluates script tags

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 67.9%
  • JavaScript 30.9%
  • HTML 1.2%