<ul dir="auto">
<li>Electron version: 0.36.10</li>
<li>Operating system: Windows 8.1 64bit</li>
</ul>
<p dir="auto">Hello ! I have just created a simple window which loads an url.</p>
<p dir="auto">The problem is that while visiting the URL in chrome or any other browser, everything is fine, but when opening it in Electron, it says jQuery is not defined.</p>
<p dir="auto">The problem comes from here:</p>
&lt;script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
    // some code using jQuery
&lt;/script&gt;
<p dir="auto">Returning <code class="notranslate">Uncaught ReferenceError: $ is not defined</code>.<br>
if I would set a timeout, everything works. But, wasn't that supposed to happen when <code class="notranslate">async</code> tag is set to true ?</p>
<p dir="auto">This behaviour looks pretty much like <code class="notranslate">async="true"</code> on script tags.<br>
I have also tried setting that <code class="notranslate">async</code> tag to <code class="notranslate">false</code> but still, same behaviour.</p>
<p dir="auto">I decided not to use a local <code class="notranslate">index.html</code> file that would contain a <code class="notranslate">webview</code> because of the white background that appears, and then, the <code class="notranslate">did-finish-loading</code> which gets triggered when the local page loads but not the webview ( which is to be expected )</p>
<p dir="auto">Therefore I am running the app like the following <code class="notranslate">window.loadURL('https://tribul.net')</code>;</p>
<p dir="auto">Is it an expected behaviour ?</p>
<p dir="auto">jQuery contains something along this lines:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if ( typeof module === &quot;object&quot; &amp;&amp; typeof module.exports === &quot;object&quot; ) {
  // set jQuery in `module`
} else {
  // set jQuery in `window`
}"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-kos">(</span> <span class="pl-k">typeof</span> <span class="pl-smi">module</span> <span class="pl-c1">===</span> <span class="pl-s">"object"</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-k">typeof</span> <span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">===</span> <span class="pl-s">"object"</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-c">// set jQuery in `module`</span>
<span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span>
  <span class="pl-c">// set jQuery in `window`</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">module is defined, even in the browser-side scripts. This causes jQuery to ignore the <code class="notranslate">window</code> object and use <code class="notranslate">module</code>, so the other scripts won't find <code class="notranslate">$</code> nor <code class="notranslate">jQuery</code> in global scope..</p>
<p dir="auto">I am not sure if this is a jQuery or atom-shell bug, but I wanted to put this on the web, so others won't search as long as I did.</p>