<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">John,<br>
<br>
Thanks for replying and contributing to the discussion. I hope I
am following your comments correctly.<br>
<br>
In X3D (not necessarily X3DOM), a Script node defines a new name
space. The only way to communication between functions in
different Script nodes is to pass events OR directly access the
other node's events (directAccess='TRUE'). If you were to read in
a Script node in an external X3D file (e.g., via GetX3dFromURL),
then that Script node would be in a separate namespace as above.<br>
<br>
Don's comment relates a desire to import JavaScript (formally
ECMAScript) into an existing Script node so that functions and
data in the imported file could be accessed directly via
ECMAScript's standard mechanisms (call, data access, etc.). This
is a really important feature for ECMAScript libraries. <br>
<br>
There was a previous comment that is a feature that allows this to
happen using 'required'. I cannot find that feature in the
ECMAScript Language Specification at
<a class="moz-txt-link-freetext" href="http://www.ecma-international.org/ecma-262/5.1/">http://www.ecma-international.org/ecma-262/5.1/</a> If it is not in
the ECMAScript specification, then it is not supported in the X3D
Script node. The X3D specification development team did not
consider the impact of such a feature. If it is in the
specification, then a review of the specification needs to
performed to make sure everything operates as intended.<br>
<br>
Also the AJAX functions XHR* and XHttp* are not in the ECMAScript
specification so that it would not be possible to access the
external file and 'eval' it.<br>
<br>
<br>
Leonard Daly<br>
<br>
<br>
<br>
<br>
</div>
<blockquote
cite="mid:CAGC3UEnAe9eW+GzMDta5y_zWRBpeKgfm-JMJxomDK65FOQZ=ag@mail.gmail.com"
type="cite">
<p dir="ltr">How is it different than reading the url into a
string say with ajax and then eval'ling the string? Perhaps I'm
missing something.</p>
<div class="gmail_quote">On Dec 7, 2014 6:47 AM, "John Carlson"
<<a moz-do-not-send="true" href="mailto:yottzumm@gmail.com">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">
<p dir="ltr">Oh, I see. I didn't realize web browsers
supported require. This may be a bigger change than you
think. However for X3D server side, it might be useful
for libraries.</p>
<div class="gmail_quote">On Dec 7, 2014 6:39 AM, "John
Carlson" <<a moz-do-not-send="true"
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">
<p dir="ltr">What about the url attribute for script?</p>
<div class="gmail_quote">On Dec 7, 2014 6:35 AM, "John
Carlson" <<a moz-do-not-send="true"
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">
<p dir="ltr">Eh, <script> doesn't support the
src attribute???? </p>
<div class="gmail_quote">On Dec 4, 2014 2:23 AM, "Don
Brutzman" <<a moz-do-not-send="true"
href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>>
wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Comments
on this issue welcome. Seems like a big omission
if indeed there is no way for an author to load an
external Javascript library into a Script node
internal to an X3D scene.<br>
<br>
<br>
-------- Forwarded Message --------<br>
Subject: [X3D] Comment on Specification by
"brutzman"<br>
Date: Wed, 3 Dec 2014 09:14:09 -0800<br>
From: Spec Feedback <<a moz-do-not-send="true"
href="mailto:spec-comment@web3d.org"
target="_blank">spec-comment@web3d.org</a>><br>
To: <a moz-do-not-send="true"
href="mailto:x3d@web3d.org" target="_blank">x3d@web3d.org</a><br>
<br>
Comment on 19777-1: JavaScript Binding - V3.3<br>
4 Concepts<br>
<a moz-do-not-send="true"
href="http://www.web3d.org/documents/specifications/19777-1/V3.0/Part1/concepts.html"
target="_blank">http://www.web3d.org/documents/specifications/19777-1/V3.0/Part1/concepts.html</a><br>
<br>
-----------------<br>
No method currently exists to import source for an
external Javascript<br>
library into an embedded X3D Script node.<br>
<br>
The ECMAScript specification reserves keywords
"import export" but does not<br>
define functionality.<br>
<a moz-do-not-send="true"
href="http://www.web3d.org/specifications/Ecma-262.pdf"
target="_blank">http://www.web3d.org/specifications/Ecma-262.pdf</a><br>
<br>
HTML supports multiple javascript libraries in the
web page via the element.<br>
<a moz-do-not-send="true"
href="http://www.w3.org/TR/html401/interact/scripts.html"
target="_blank">http://www.w3.org/TR/html401/interact/scripts.html</a><br>
<a moz-do-not-send="true"
href="http://www.w3.org/TR/html5/scripting-1.html"
target="_blank">http://www.w3.org/TR/html5/scripting-1.html</a><br>
<br>
X3D needs a similar mechanism where an X3D Script
author can use/reuse an<br>
external Javascript library.<br>
-----------------<br>
<br>
Submitted on Wednesday, 2014, December 3 - 9:14am<br>
by brutzman (brutzman )<br>
IP: 205.155.65.226<br>
<br>
<br>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<font class="tahoma,arial,helvetica san serif" color="#333366">
<font size="+1"><b>Leonard Daly</b></font><br>
X3D Co-Chair<br>
Cloud Consultant<br>
President, Daly Realism - <i>Creating the Future</i>
</font></div>
</body>
</html>