title: Reaching the content of a frame from a Chrome extension?
body: <p>I'm writing a Chrome Extension that changes calls to document.all so that it can be used in chrome.</p>
  
  <p>However, the page consists of a script that writes a frameset using document.writeln.
  The frameset consists of one frame "FrameMain".</p>
  
  <p>I'm having difficulties getting a variable pointing to the document in FrameMain.</p>
  
  <p>I think the problem is that the FrameMain isn't created when document_start in chrome and it's not loaded when document_end occurs.</p>
  
  <p>I'm currently using document_end as a starting point for my script:</p>
  
  <pre><code>$('FrameMain').ready(function () {
      console.log("ready");
      console.log(parent.frames);
      console.log(parent.frames[0]);
  });
  </code></pre>
  
  <p>The ready is printed when it seems the frame is loaded, it's not displayed immediately.<br>
  However, parent.frames returns a DOMWindow and parent.frames[0] is undefined.<br>
  <strong>How can I get a reference to the frames content?</strong></p>