W3C home > Mailing lists > Public > www-html@w3.org > March 2004

RE: XML Events : Should modification of the node containing a script be allowed?

From: Victor Kapustin <vak@mail.nw.ru>
Date: Tue, 9 Mar 2004 22:53:49 +0300
To: <ernestcline@mindspring.com>, <www-html@w3.org>

Totally agree with your message, Ernest. I hope the words written will find
their way to the XHTML2 Standard (and into implementations too:).

But. Browsers, AFAIK, use SAX-like approach for faster rendering. That means
that the Standard should clearly forbid ANY scripting before the DOM tree
has been created - before onLoad event has been fired (no exceptions for any
"init"). Even in that case deleting/inserting script elements (e.g. during
event handling) could cause deadlocks and some other dangers. Suppose a
couple of script elements like

<script id="nextLib" src="verySlowURL" declare="declare" />
<script id="evHndl" src="notSoSlowURL" include="nextLib" />

are inserted, and a function from the second script is assigned as an event
listener. Should it be ever possible BEFORE the "nextLib" has been loaded?

BTW (just came to my mind), if the scripting scope is local, scripts would
require some facility to export functions to the hosting environment to,
say, use the function as event listeners. Moreover, if the script sources
are different, there should be some [globally?] universal mechanism for
resolving name conflicts.

Should the Standard limit possible lame?

> (AFAIK, there is no include capability in ECMAScript.)
You are right: ECMAScript has no include capability. Is there any way to
request the feature? And <script> scoping too?

Victor Kapustin
Received on Tuesday, 9 March 2004 14:53:23 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:08 UTC