title: pass javascript function to child window opened with window.open()
body: <p>Having problems passing a javascript function from parent window to child window. Works fine in Firefox and Chrome but not in IE (tested with IE11). Ironically it works even in IE if F12 dev tools are opened. This is in the same domain so cross domain blocks should no be an issue. What I have tried:</p>
  
  <pre><code>// on the parent
  var newWin = window.open('href', 'title', ''); 
  newWin.myFunc = function() { alert('test'); };
  
  // on the child (when calling this I get error: 'myFunc' is undefined)
  myFunc();
  </code></pre>
  
  <p>I know I can go the other way around -- calling a function defined on the parent from the child:</p>
  
  <pre><code>// on the parent
  function myFunc() {
      alert('test');
  }
  
  // from child
  opener.myFunc();
  </code></pre>
  
  <p>But for reasons beyond the scope of this questions I need to be able to pass an anonymous function to the child which it must to be able to execute.</p>