title: Render Extjs elements into other frame
body: <p>I want to render Ext elements in an iframe.</p>
  
  <p>In the page that is loaded into the iframe, I have a div element:</p>
  
  <pre><code>&lt;div id="panel"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>When the iframe is loaded, I want to render an Ext panel into this div element.</p>
  
  <p>So the page loaded into the iframe got a function which is executed on load:</p>
  
  <pre><code>console.log(parent.Ext.get("panel"));
  console.log(document.getElementById("panel"));
  console.log(new parent.Ext.dom.Element(document.getElementById("panel")));
  parent.Ext.create('Ext.Panel',{
      layout : 'fit',
      height : 200,
      width : 600,
      autoScroll: false,
      renderTo : new parent.Ext.dom.Element(document.getElementById("panel"))
  });
  </code></pre>
  
  <p>The console messages are as follows:</p>
  
  <pre><code>null VM14143:10
  &lt;div id=​"panel"&gt;​…​&lt;/div&gt;​ VM14143:11
  D {el: D, dom: div#panel, id: "panel", $cache: Object, self: function…} VM14143:12
  TypeError: Cannot read property 'dom' of null
  </code></pre>
  
  <p>The TypeError is occuring no matter which of the three console.logs I put into renderTo: <code>renderTo: parent.Ext.get("panel")</code> or <code>renderTo: document.getElementById("panel")</code> or <code>renderTo: new parent.Ext.dom.Element(document.getElementById("panel"))</code>, but it does not occur when I remove the <code>renderTo</code> line completely.</p>
  
  <p>Now, how can I render a panel into my div?</p>