title: Function works in onload but not onclick
body: <p>This dead simple stub of a web page will execute the <code>translate()</code> function in <code>onload</code> but not in the button's <code>onclick</code>.  It instead throws "Uncaught TypeError: translate is not a function".</p>
  
  <p>What simple mistake am I making?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function createSvgDef() {
      console.log("createSvgDef()");
  }
  
  function translate() {
      console.log("translate()");
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;head&gt;
      &lt;link rel="stylesheet" href="this-thing.css"/&gt;
      &lt;script type="text/javascript" src="this-thing.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload="createSvgDef(); translate();"&gt;
      &lt;textarea id="input"&gt;Hello World!&lt;/textarea&gt;
      &lt;button onclick="translate();"&gt;Translate&lt;/button&gt;
      &lt;div id="output"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>