<p dir="auto">Ref <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=942279" rel="nofollow">https://bugs.chromium.org/p/chromium/issues/detail?id=942279</a></p>
<ul dir="auto">
<li>Output of <code class="notranslate">node_modules/.bin/electron --version</code>: v2.0.7</li>
<li>Operating System (Platform and Version): macOS High Sierra 10.13.6</li>
</ul>
<p dir="auto"><strong>Expected Behavior</strong><br>
upon opening the same page multiple times, it should only execute .js file once</p>
<p dir="auto"><strong>Actual behavior</strong><br>
let's say i open the same page/windows 5 time back &amp; forth, then it duplicates the same .js file 5 times and it executes the same code 5 times</p>
<p dir="auto"><strong>Additional Information</strong><br>
I have a main index.html file and i delete/insert tags to create pages on my app. But in the background it duplicates same files and executes them at the same time. In addition let's say i have a function name <code class="notranslate">function xyz() {console.log('a')}'</code> on script A.js and <code class="notranslate">function xyz() {console.log('b')}'</code> on script B.js. If i go to page A and B then execute the function on page B, it executes both functions in A and B and prints both 'a' and 'b'</p>
<p dir="auto">here is my html structure to load scripts</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;html&gt;
&lt;body&gt;
.... i manipulate here
&lt;script src='/a.js'&gt;
&lt;/body&gt;
&lt;/html&gt;"><pre class="notranslate"><code class="notranslate">&lt;html&gt;
&lt;body&gt;
.... i manipulate here
&lt;script src='/a.js'&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre></div>