<p dir="ltr"><a href="https://andreasplesch.github.io/cobweb_dom/tests/x3d_script.xhtml">https://andreasplesch.github.io/cobweb_dom/tests/x3d_script.xhtml</a></p>
<p dir="ltr">Since the script tag is already claimed by HTML, there is a conflict with the XML encoding of the x3d script node when x3d nodes are considered page DOM elements.</p>
<p dir="ltr">Nevertheless, in the page above, both types of JavaScripts, 'regular' web page and 'special' x3d, function correctly. The sphere is controlled by a SAI script whereas all other actions are driven by HTML scripts.</p>
<p dir="ltr">This is possible because a HTML script element with a type attribute which is not recognized as an ecmascript related mime type is not executed by the web browser. In the example I used application/x-vrmlscript which at some point was the recommended mime type. But application/SAIscript would also have the desired effect, for example.</p>
<p dir="ltr">Cobweb, on the other hand, is not bothered by the type attribute and proceeds to execute the script as a x3d script.</p>
<p dir="ltr">This solution to allow dual use of the script tag would be understood by web developers because the script tag with special type attributes is used fairly widely to protect data content from being interpreted by the browser in some way.</p>
<p dir="ltr">While this is practical today, what would be required in the standard to allow such a type attribute in the XML encoding of the x3d script node? Since this type attribute would not represent a field, perhaps only the XML encoding standard would be affected?</p>
<p dir="ltr">Andreas </p>
<p dir="ltr">-- <br>
Andreas Plesch<br>
39 Barbara Rd.<br>
Waltham, MA 02453</p>