title: electron's remote.getGlobal() returns "undefined" after window.location.replace()
body: <p>I've been fiddling around with electron's remote module.
  In my main-process I've created this variable:</p>
  
  <pre><code>global.storage = {};
  </code></pre>
  
  <p>My renderer-process is initialised with a file called startup.html.</p>
  
  <pre><code>win.loadURL('file://' + __dirname + '/startup.html')
  </code></pre>
  
  <p>In there, I include a javascript file containing the following function:</p>
  
  <pre><code>function enterMain(value){
      remote.getGlobal('storage').exmpl = value;
      window.location.replace('./general.html');
  }
  </code></pre>
  
  <p>The value I'm passing is "hello", and when calling upon...</p>
  
  <pre><code>console.log(remote.getGlobal('storage').exmpl);
  </code></pre>
  
  <p>...after assigning the value it returns "hello", as it should. However, once the window location has been replaced to general.html, in which I include a javascript file containing this function:</p>
  
  <pre><code>$(document).ready(function(){
       console.log(remote.getGlobal('storage').exmpl);
  });
  </code></pre>
  
  <p>...it returns <em>undefined</em>.
  Why? Can anyone help me make sense of this?</p>