title: ES6 Modules: Undefined onclick function after import
body: <p>I am testing ES6 Modules and want to let the user access some imported functions using <code>onclick</code>:</p>
  
  <p>test.html:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;Module Test&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;input type="button" value="click me" onclick="hello();"/&gt;
      &lt;script type="module"&gt;import {hello} from "./test.js";&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>test.js:</p>
  
  <pre><code>export function hello() {console.log("hello");}
  </code></pre>
  
  <p>When I click the button, the developer console says: <em>ReferenceError: hello is  not defined</em>. How can I import functions from modules so that they are available as onclick functions?</p>
  
  <p>I am using Firefox 54.0 with <code>dom.moduleScripts.enabled</code> set to <code>true</code>.</p>