title: Javascript : onHashchange Test
body: <p>I'm trying to check if the browser supports <code>onHashChange</code> or not to hide some code from it if not, in this way:</p>
  
  <pre><code>if(window.onhashchange){
      ...code...
  } else {
     ...other code...
  }
  </code></pre>
  
  <p>I tried this too:</p>
  
  <pre><code>if(typeof window.onhashchange === "function"){
      alert("Supports");  
  } else {
      alert("Doesn't Supports");  
  }
  </code></pre>
  
  <p>As described on <strong><a href="http://www.quirksmode.org/js/support.html" rel="noreferrer">Quirksmode</a></strong> this should work but if I do an <code>alert</code> for example in <code>true state</code> in <code>Safari</code> than alerts me but Safari is not supporting <code>onHashChange</code> :S</p>
  
  <p>What's the problem with it? If I'm not on the right way how should I check it?</p>