the script calls something like document.write(&quot;</body>&quot;).</p>
<p>This browser behavior may seem surprising to a developer coming from jQuery, because jQuery implements code specifically to find script tags and run them in this scenario. Mithril follows the browser behavior. If jQuery behavior is desired, you should consider either moving the code out of the HTML string and into an <code>oncreate</code> <a href="lifecycle-methods.html">lifecycle method</a>, or use jQuery (or re-implement its scrip