W3C home > Mailing lists > Public > www-svg@w3.org > July 2005

[SVG12]: EventListenerInitializer2 and ECMA

From: Tomi Oinonen <tomi.oinonen@solita.fi>
Date: Tue, 12 Jul 2005 10:24:11 +0300
To: <www-svg@w3.org>
Cc: "'Arttu Rantanen'" <arttu.rantanen@solita.fi>
Message-ID: <E1DsF9S-0002FD-I9@maggie.w3.org>

Hi all,

I'm afraid I'm not an active follower of this mailing list and I appologize
if my question has already been asked. If this is the case, could someone
kindly point me a link to the answer.

My question refers to specification Scalable Vector Graphics (SVG) Tiny 1.2
Specification, to working draft 11 May 2005.

I'm trying to integrate ECMA and SVG tiny implementations. It's not that
obvious to me how EventListenerInitializer2 should be used in ECMA script.
It is mentioned in chapter A.7.18 EventListenerInitializer2 that:

"EventListenerInitializer2 allows event listeners to be initialized. In
typical usage with Java, a <script> element references a JAR file which
contains a manifest entry (SVG-Handler-Class) which identifies the class
responsible for creating the event listeners. For ECMAScript, the script
global object must implement the EventListenerInitializer2 interface, thus
providing methods initializeEventListeners and createEventListener on the
script global object. Further information about EventListenerInitializer2
can be found in the Scripting chapter "

In chapter 15.2 Scripting it is mentioned that:

"Also, the script global object must implement the EventListenerInitializer2
interface by providing an initializeEventListeners function that is called
for every script element in the document and a createEventListener function
that is called for every handler element that has a script content type of
"application/ecmascript".

Actually I'm looking for use case for the interface (from ECMA point of
view):

1) Is it purpose that script code calls global object's
EventListenerInitializer2 interface methods?
2) If EventListenerInitializer2 methods are not be called from the script,
should script code somehow implement the interface like in Java and be
called by user agent?
3) If EventListenerInitializer2 methods are called only by user agent and
they should not be called by the script, why SVG IDL should have
EventListenerInitializer2 interface visible at all in ECMA script (as I
understood global object must implement the interface and thus the interface
becomes visible to ECMA script code, too).
4) There is a use case that I haven't figured out?

If case 3 is true and EventListenerInitializer2 methods are visible to ECMA
script code, what happens if interface methods are called from ECMA script
code?

If I have understood this in a correct way, EventListenerInitializer2
interface should be implementation specific issue and only behavior should
be specified as far as ECMA script is concerned (script code gets executed
and listeners are initialized). But my assumption might be wrong and
therefore I'd really like to get answer to these questions. An example might
also do some good.

Yours Truly,

Arttu Rantanen
Team Manager
Solita Oy
Satakunnankatu 18 A
FI-33210 Tampere, Finland
Mobile +358 40 837 7290
Office +358 3 389 1380
Fax	+358 3 389 1381
Email: arttu.rantanen@solita.fi
http://www.solita.fi
Received on Wednesday, 13 July 2005 08:26:01 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:31 GMT