set cursor to start of inputbox
<p>I have an input box that is populated with text just after page load.  As shown in the following example.</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var someString = "some text that was set after page load.";
document.getElementById("myInput").value = someString;</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input id="myInput" autofocus&gt;&lt;/input&gt;</code></pre>
</div>
</div>
</p>

<p>After the text is added, I want to put the cursor at the start of the input instead of the end.  Any advise.</p>

<p>This is a vanilla JS project.</p>