<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 12/7/2014 11:09 AM, Clayton
Cottingham wrote:<br>
</div>
<blockquote
cite="mid:CFA3399C-0F4F-48B6-9634-243ACD213BCB@gmail.com"
type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
Just shooting spitballs here... is there no way to load the js in
the html and use that in the x3d script node ?<br>
</blockquote>
<br>
X3DOM is different because it runs directly in the browser
environment. I was discussing the issue strictly from the standpoint
of X3D. There may be an X3D environment that does not run in the
context of a browser (e.g., Xj3D). The browser capabilities cannot
be assumed for this type of environment.<br>
<br>
<br>
Leonard Daly<br>
<br>
<br>
<br>
<br>
<br>
<blockquote
cite="mid:CFA3399C-0F4F-48B6-9634-243ACD213BCB@gmail.com"
type="cite">
<br>
Html<br>
Head<br>
Script src=js4x3dom.js<br>
<br>
Body<br>
X3d<br>
Script use js4x3dom.js<br>
<br>
<br>
<br>
<br>
<div class="gmail_quote">On 7 December, 2014 9:02:18 AM PST,
Leonard Daly <a class="moz-txt-link-rfc2396E" href="mailto:web3d@realism.com"><web3d@realism.com></a> wrote:
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<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
moz-do-not-send="true" 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>
<pre class="k9mail"><hr>
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
<a moz-do-not-send="true" href="http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk">http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk</a></pre>
<pre class="k9mail"><hr>
x3dom-developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:x3dom-developers@lists.sourceforge.net">x3dom-developers@lists.sourceforge.net</a>
<a moz-do-not-send="true" href="https://lists.sourceforge.net/lists/listinfo/x3dom-developers">https://lists.sourceforge.net/lists/listinfo/x3dom-developers</a>
</pre>
</blockquote>
</div>
<br>
-- <br>
Sent from my Android
</blockquote>
<br>
<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>