<div dir="ltr">Here is an example with lots of stacked inlines adopted straight from the Cobweb examples library to test the robustness of how inline doms are appended to the main dom in the cobweb dom adapter:<br><div><br><a href="https://andreasplesch.github.io/cobweb_dom/tests/inline_Mushrooms.xhtml">https://andreasplesch.github.io/cobweb_dom/tests/inline_Mushrooms.xhtml</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Click on the Move House button to move the little house around a bit. All seems to work well, and having a larger combined scene all in the main DOM also seem to be ok.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">-Andreas<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 5, 2016 at 1:33 PM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>This is an update to efforts to expose inline content to dom manipulation with cobweb.<br><br><a href="https://andreasplesch.github.io/cobweb_dom/tests/inlinev2.xhtml" target="_blank">https://andreasplesch.github.<wbr>io/cobweb_dom/tests/inlinev2.<wbr>xhtml</a><br><br></div>I have updated and refactored the bridge code to automatically append inline doms to the main dom not just for the initial scene inlines but also for newly added inline nodes. [For the interested, the challenge there is to deal with the async nature of loading.]<br><br></div>So the deer demo now let's you add new inlines. You can check in the Inspector that the new inlines have their scenes appended as children. It should be possible to directly manipulate the inline content in the Inspector and see effect on the scene. There is also a button to add USE inlines ('linked') and one which manipulates the referenced DEF inline to demonstrate the differences to the independant inlines.<br><br></div>It takes a while to add a new inline. This is due to loading and parsing, I believe.<br><br></div>-Andreas<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 1, 2016 at 12:12 AM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I am working on adding DOM access to inline scenes for my Cobweb DOM bridge:</p>
<p dir="ltr"><a href="https://andreasplesch.github.io/cobweb_dom/tests/inline_in_inline.xhtml" target="_blank">https://andreasplesch.github.i<wbr>o/cobweb_dom/tests/inline_in_i<wbr>nline.xhtml</a></p>
<p dir="ltr">The idea is to add the external inline scene DOMs to the main scene DOM as children of the Inline elements. Once added, the mutation observer picks up modifications of these children and does not need to do anything other than it already does for the main scene.</p>
<p dir="ltr">It works well although I do not know how web browsers deal with large combined DOMs. Also, a small addition to Cobweb.js is currently needed.</p>
<p dir="ltr">One effect is that one can use CSS selectors with querySelector to drill down to specific elements in inline scenes, even through hierarchies of inlined inlines. See example. This way the DEF names can be used even if they are identical across scenes. X3D semantics and functioning is not affected.</p>
<p dir="ltr">X3dom uses a different approach of prefixes to id/DEF attributes to enable access to elements in inlines. Not sure if x3dom could use instead or in addition Selectors ? This would require adding the Inline DOMs to the main DOM but perhaps this is already almost done ?</p>
<p dir="ltr">So I am considering also adding the same option of a namespacename prefix to element IDs but the effort would be really for compatibility. Thinking about it, while possible probably not a priority unless there is a compelling use case.</p>
<p dir="ltr">X3D has EXPORT/IMPORT to deal with accessing nodes in inlines. I think the SAI equivalent is roughly that all nodes are EXPORTed by default and that in addition to a DEF name it becomes possible to address a node by its path in the scene hierarchy. Perhaps something to consider for the standard: X3D selectors.</p><span class="m_4498334412842801254HOEnZb"><font color="#888888">
<p dir="ltr">Andreas</p><span class="HOEnZb"><font color="#888888">
</font></span></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_4498334412842801254gmail_signature" data-smartmail="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div></div>