Adding script with type

Hello! I want to add this code to my site dynamically

<script type="text/babel">
  ReactDOM.render(
    <h1>Hello, world!</h1>,
    document.getElementById('root')
  );
</script>

How i can set type of script?

Currently there’s no such ability in the view.