title: What exactly can an IFrame do with the top.Location object (cross-domain)?
body: <p>There is a very particular edge case in cross-domain policies regarding the window.top.Location object...</p>
  
  <p>Let's say I have IFrame A , in domain www.bbb.com, living inside a page in domain www.aaa.com.</p>
  
  <p>The page inside the IFrame can:  </p>
  
  <ul>
  <li>Compare window.top.location to window.location (to detect whether it's being framed)</li>
  <li>Call window.top.location.replace(window.location) to redirect to self </li>
  <li>Call window.top.location.replace("any arbitrary string") to redirect somewhere else</li>
  </ul>
  
  <p>But it cannot:</p>
  
  <ul>
  <li>Alert, Document.Write, or do any kind of output of window.top.location.href</li>
  <li>Concatenate it in any other variable, or use it in any useful way</li>
  <li>Call window.top.location.reload()</li>
  </ul>
  
  <p>These are just the ones I could quickly find. I'm sure there are other edge cases.<br>
  It seems like the browser is not allowing the use of the top.location object if the top is in another domain, <strong>except</strong> for a few whitelisted things...</p>
  
  <p>Is this documented anywhere?<br>
  Can I find what these whitelisted things are?<br>
  Is this in the HTML standard, and implemented equally in all browsers? Or is the implementation of this semi-random?</p>