<div dir="ltr"><p dir="ltr">This was based on the cobweb home page which should have the canonical code on how to load a X3D file into a cobweb browser instance. My code is just simplified and probably easier to understand.</p>
<p dir="ltr">It would be nice to have a page explaining what content window.X3D functions and what browser functions are available but I think they faithfully follow the SAI.</p>
<p dir="ltr">There is some more discussion here</p>
<div class="gmail_quote">On Jan 9, 2016 1:37 AM, "John Carlson" <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><pre>    Thanks to Andreas Plesch.  Holger, could you add something like this to the Cobweb page to document how to build xml on the fly and submit it to Cobweb for viewing?  Thanks, John</pre><pre>For an frame outside an iframe, xml being an array of strings.</pre><pre>       var content = xml.join("");</pre><pre>    var cobwebWindow = document.getElementById("cobwebframe").contentWindow ;
    var cobwebEle = cobwebWindow.document.getElementById("x3dele");
    if (typeof cobwebWindow.X3D !== 'undefined') {
            var browser = cobwebWindow.X3D.getBrowser(cobwebEle);
            browser.replaceWorld(browser.createX3DFromString(content));
            // etc.
    }
</pre><pre><br></pre><pre>and something else for loading inside the same document (which I can get from Andreas, I think).</pre><pre><br></pre><pre>John</pre>
            <p></p></div></blockquote></div>
</div>