title: typeof returning "unknown" in IE
body: <p>I have a window, where before being closed I refresh the underlying page.</p>
  
  <pre><code>if(opener &amp;&amp; typeof(opener.Refresh) != 'undefined')
  {
      opener.Refresh();
  }
  </code></pre>
  
  <p>If I moved away from the original opening page, this code would throw a <em>"Permission Denied"</em> error.</p>
  
  <p>Debugging the code revealed that <code>typeof(opener.Refresh)</code> was equal to <em>"unknown"</em> instead of the expected <em>"undefined"</em>.</p>
  
  <p>As far as I'm aware <em>"unknown"</em> is not one of the return values for <code>typeof</code>, <strong>so how and why would this value be returned?</strong></p>
  
  <p><strong><em>Further Information</em></strong></p>
  
  <p>I avoided the error by changing the check to:</p>
  
  <pre><code>if(opener &amp;&amp; typeof(opener.Refresh) == 'function')
  </code></pre>
  
  <p>However examples like this (<a href="https://stackoverflow.com/questions/27509/detecting-an-undefined-object-property-in-javascript">detecting-an-undefined-object-property-in-javascript</a>) do not seem to factor "unknown" into the equation.</p>