title: javascript <object> has #document child in DOM inspector, but has childElementCount=0
body: <p>I'm trying to mash a proof of concept together and have the following rough code snippet in there...</p>
  
  <pre><code>var jenkinsBuilds = [
      {url:"http://jenkins.server:8080/view/project/job/build_type1/", x:100, y:100},
      {url:"http://jenkins.server:8080/view/project/job/build_type2/", x:200, y:200}
  ];
  
  function createBuild(buildData) {
  
      var divBuild = document.createElement("div");
      divBuild.className = "buildNode";
      divBuild.title = buildData.url;
      divBuild.style.left = buildData.x + "px";
      divBuild.style.top = buildData.y + "px";
      backdrop.appendChild(divBuild);
  
      var obj = document.createElement("object");
      obj.onload = loadedObj;
      obj.type = "text/html";
      obj.data = buildData.url + "api/json?tree=builds[number]";
      divBuild.appendChild(obj);
  }
  
  function loadedObj(e) {
      alert(e.srcElement);
  }
  </code></pre>
  
  <p>The alert comes up with <code>[object HTMLObjectElement]</code>.</p>
  
  <p>I'm wanting to get the json contents of the object into a <code>var json =</code> variable to do a JSON.parse() on later, but I don't know how to get the json contents out of the object.</p>
  
  <p>When I look at the object in the Chrome DOM inspector, it has...</p>
  
  <pre><code>&lt;div&gt;
     L &lt;object&gt;
          L #document
               L &lt;html&gt;
                    L &lt;head&gt;&lt;/head&gt;
                    L &lt;body&gt;
                         L &lt;pre&gt;
                              "{"builds":[{"number":3431},{"number":3430},{"number":3429},{"number":3428},{"number":3427}]}"
                           &lt;/pre&gt;
  </code></pre>
  
  <p>So I can see the json contents in the innerText of the  node in the inspector.</p>
  
  <p>But - the <code>&lt;object&gt;</code> has <code>childElementCount: 0</code> and the #document has <code>ownerDocument: null</code> and <code>parentNode: null</code> - so how can I get access to the <code>&lt;pre&gt;</code>'s json <code>innerText</code>?</p>
  
  <p>I would prefer to use plain javascript rather than jQuery if possible (for ease of maintainability if I get hit by a truck).</p>
  
  <p>This is not intended for public use, and will be run on the latest browsers (99% Chrome and Firefox).</p>
  
  <p>Thanks for any help.</p>