I have a hello.js
(it's babelify transpiled react code) loaded with:
<script type="text/javascript" src="/static/js/hello.js"></script>
and I want to append a few lines of code to the end of it. Is that possible?
Edit: The lines I want to add are:
var hello = _react["default"].createElement(Hello, {
name: "World!!!"
});
_reactDom["default"].render(hello, document.getElementById('hello'));
Where Hello
, _react
, _reactDom
are all objects created in hello.js
. The lines themselves are arbitrary. My real question is can I add code to a prexisting script in the browser?