title: Can't access content of another frame in Chrome
body: <p>I have two frames. The pages in both frames come from the same domain (either localhost or a live domain - both using the same protocol).</p>
  
  <p>The first frame needs to access elements of the second frame (xsample) when it's fully loaded and any onload JS functions have completed. But the second frame takes a while to load.</p>
  
  <pre><code>&lt;frameset cols="*,*" rows="*" border="0" framespacing="0"&gt;
      &lt;frame src="picker.asp" name="xpicker" frameborder="no" marginwidth="15" marginheight="15"&gt;
      &lt;frame src="doc.asp" name="xsample" frameborder="no" marginwidth="15" marginheight="15"&gt;
  &lt;/frameset&gt;
  </code></pre>
  
  <p>The code below works in IE and Firefox but not in Chrome or Safari, In those <code>parent.xsample</code> is always false</p>
  
  <pre><code>function startWork(){
  if(isSurveyLoaded()==false){
      SL=setTimeout("startWork()",1000);
      return;
  }
  else{
      setTimeout("doMoreWork()",2000);
  }
  }
  
  function isSurveyLoaded(){
      if(!parent.xsample){
          return false;
      }
      if(!parent.xsample.self.name){
          return false;
      }
      if(parent.xsample.document.readyState!='complete'){
          return false;
      }
      else{
          return true;
      }
  }
  </code></pre>