title: Is it possible to override window.location.hostname in Javascript?
body: <p>I'm curious is there any possibility to override window.location.hostname?
  I didn't found anything about that on google... probably I searched for wrong phrases because I think that someone had to asked it before me.</p>
  
  <p>Sorry for my bad english.</p>
  
  <p>EDIT:
  To be more specific. I don't want to do that. I want to know if someone can override that to execute my code.</p>
  
  <p>In general - I have list of domains that I approve to execute some code. When</p>
  
  <p><code>if (window.location.hostname === myurl.com)</code> gives true then they are good to go, other case they will have alert or something. I don't want someone to do something like that:</p>
  
  <pre><code>window.location.hostname = "myurl.com" 
  
  if (window.location.hostname === myurl.com)
  </code></pre>