script-inner-html

2.0.4 • Public • Published

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

Package Sidebar

Install

npm i script-inner-html

Weekly Downloads

13

Version

2.0.4

License

MIT

Last publish

Collaborators

  • imbugs