title: How to properly use JSExport methods in a JSExportTopLevel object in Scala.js from a <script> tag?
body: <p>I have some sjs code:</p>
  
  <pre><code>@JSExportTopLevel("CCRS")
  object JsApi {
  
    @JSExport
    def makeJobId: JobId = JobId()
    // ...
  }
  </code></pre>
  
  <p>I have the following <code>&lt;body&gt;</code> element, which I'll note is properly finding the sjs-generated <code>.js</code> files since I was using a 3rd party SPA framework previously - though the launcher for that is now commented out:</p>
  
  <pre><code>&lt;body&gt;
  &lt;script type="application/javascript" src="ace/ace.js" charset="utf-8"&gt;&lt;/script&gt;
  &lt;script type="application/javascript" src="target/web-client-jsdeps.js"&gt;&lt;/script&gt;
  &lt;script type="application/javascript" src="target/web-client-opt.js"&gt;&lt;/script&gt;
  &lt;!-- &lt;script src="target/web-client-launcher.js"&gt;&lt;/script&gt; --&gt;
  &lt;input type="text"
         placeholder="Enter a command:"
         value="pwd"
         onkeydown="oneShotHandler()" /&gt;
  &lt;div id="one-shot-demo"&gt;&lt;/div&gt;
  &lt;script type="application/javascript"&gt;
    var oneShotId = CCRS.makeJobId();
  &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Upon page load, I get the following error: <code>TypeError: CCRS.makeJobId is not a function</code>.</p>
  
  <p>Not really sure what I should be looking for in the generated <code>web-client-opt.js</code> file (using sjs 0.6.22 currently, with <code>-P:scalajs:sjsDefinedByDefault</code>). But, I do see this line, which I believe should be doing the export:</p>
  
  <pre><code>$e.CCRS = $m_Lorg_xsede_jobrunner_client_JsApi$();
  </code></pre>