- From: Diego Gibellino <d.gibellino@gmail.com>
- Date: Wed, 3 May 2006 10:43:27 +0200
- To: www-svg@w3.org
- Message-ID: <665fd00c0605030143j4b3a9beap5fe8f716fe9c1d0a@mail.gmail.com>
Hi, I would like to clarify - if possible - some doubts about the SVG1.2 Tiny WD 1) Pag. 175 Section 15.2 "Any scripting logic associated with a given* script * element is executed at most once." In my understanding the Script element can contain script text of two kind: functions or global script. <script type="application/ecmascript"><![CDATA[ //GLOBAL SCRIPT var x = 0; var y = 50; //FUNCTION function first() { textElement = document.getElementById("svgtext"); svgRoot = document.getElementById("root"); } [...] Global script text should be fired at most once when the scene is loaded but script functions can be invoked by an handler element and therefore can be executed several times depending on the handler logic (responding to a ev:click event for example). Is this correct or I missed any important information? Is it possible to have several script elements in the same SVG Document? If yes, how the uDOM engine should deal with them? From an implementation point of view it should put together all the script text and then execute it as a whole script? 2) Pag. 163 […] <!-- handler which is called when myRect2 is replaced by myRectNew --> <handler xml:id="myNavigationHandler" type="application/ecmascript"><![CDATA[ var myRect1 = document.getElementById("myRect1"); var myRect3 = document.getElementById("myRect3"); [...] Here the handler script text is contained in a CDATA section. This is the only example in the spec where handler has a CDATA child , in the other examples (Pag. 202, 203 …) the CDATA node does not exist. It is CDATA needed for the handler element or is a typo? Thank you in advance and Best Regards, Diego
Received on Wednesday, 3 May 2006 08:43:32 UTC