thril-in-a-non-browser-environment">Running mithril in a non-browser environment</a></h3>
<p>Mithril has a few dependencies on globals that exist in all its supported browser environments but are missing in all non-browser environments. To work around this you can use the browser mocks that ship with the mithril npm package.</p>
<p>The simplest way to do this is ensure the following snippet of code runs <strong>before</strong> you include mithril itself in your project.</p>
<pre><code class="lang-js">// Pol