<style>@font-face{font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}</style><font face="Calibri"><p dir=ltr>On November 29, 2015, at 2:10 PM, Don Brutzman <brutzman@nps.edu> wrote:</p>
<p dir=ltr>>Am looking forward to learning more about how you and Andreas got both X3DOM and Cobweb to coexist within a single page harmoniously.</p>
<p dir=ltr><span style="color: #1f497d;">Well, effectively they live on two separate pages with the </span><span style="color: #1f497d;">cobweb</span><span style="color: #1f497d;"> page embedded in the other via a html </span><span style="color: #1f497d;">iframe</span><span style="color: #1f497d;"> element. An </span><span style="color: #1f497d;">iframe</span><span style="color: #1f497d;"> is the author recommended way to add </span><span style="color: #1f497d;">cobweb</span><span style="color: #1f497d;"> to a page. It is supposed to provide encapsulation. It turns out the parent page can access the </span><span style="color: #1f497d;">iframe</span><span style="color: #1f497d;"> if it is local and vice versa but only explicitly.</span></p>
<p dir=ltr><span style="color: #1f497d;">This is why I was surprised that having both </span><span style="color: #1f497d;">x3dom</span><span style="color: #1f497d;"> and </span><span style="color: #1f497d;">cobweb</span><span style="color: #1f497d;"> in iframes did not work; only one would show depending on order. Only the second </span><span style="color: #1f497d;">iframe</span><span style="color: #1f497d;"> would render. Something seems to leak out of the </span><span style="color: #1f497d;">iframe</span><span style="color: #1f497d;">, in Firefox.</span></p>
<p dir=ltr><span style="color: #1f497d;">X3dom</span><span style="color: #1f497d;"> uses web components custom element feature. Perhaps </span><span style="color: #1f497d;">registerelement</span><span style="color: #1f497d;">() is not confined to the </span><span style="color: #1f497d;">iframe</span><span style="color: #1f497d;"> ? By design or by accident ?</span></p>
<p dir=ltr><span style="color: #1f497d;">Cobweb</span><span style="color: #1f497d;"> seems to just scan the document for an </span><span style="color: #1f497d;">x3d</span><span style="color: #1f497d;"> tag, picks up the url there and then does its own parsing, scene graph construction etc. But something interfered, having </span><span style="color: #1f497d;">x3dom</span><span style="color: #1f497d;"> in a second </span><span style="color: #1f497d;">iframe</span><span style="color: #1f497d;">.</span></p>
<p dir=ltr><span style="color: #1f497d;">This is how deep I ventured, when I had the idea that </span><span style="color: #1f497d;">x3dom</span><span style="color: #1f497d;"> on the main page is also a possibility which then worked.</span></p>
<p dir=ltr><span style="color: #1f497d;">Andreas</span></p>
<p dir=ltr>>all the best, Don<br>
>-- <br>
>Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman@nps.edu<br>
>Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
>X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman<br>
</p>
</font>