Re: <script> as handler for XML events

smaug <[email protected]> Sat, 17 Jun 2006 01:11:27 +0300
Newsgroups gmane.comp.mozilla.devel.xml
Message-ID <[email protected]>
Chris Cross wrote:
> Jonas,
> 
> I'm developing a Mozilla extension implementing XHTML+Voice, or X+V (see 
> http://www.w3.org/TR/xhtml+voice/ and 
> http://www.voicexml.org/specs/multimodal/x+v/12/) The X+V profile pulls 
> in VoiceXML <form> and makes it a handler for XML events. However, to 
> make a multimodal application truly interesting, the document author 
> needs the ability to respond to the XML events emitted by VoiceXML. 
> Opera and NetFront have implemented <script> as a handler by allowing it 
> to be specified in the XML events <listener> element, without otherwise 
> affecting the behavior of <script> (it still executes on page load, for 
> example.) This approach is used in examples in the XML spec but is not 
> normative. There was some discussion of including it in the Mozilla XML 
> events implementation 
> (https://bugzilla.mozilla.org/show_bug.cgi?id=164482) .
> 
> What are the options to implement this behavior in Mozilla?
> 
> chris

It would be great if W3C had a specification for script elements as XML 
Events handlers.
(Still waiting to see the "companion specification", 
http://www.w3.org/TR/xml-events/Overview.html#section-eventhandlers)

Do Opera and NetFront handle <script> in the same way? For example, is 
the event object accessible from the script (probably using |event| ) 
and what is the |this| object in the script? How, or based on what is 
the script execution deferred when the element is a handler (i.e. where 
did the "declare" attribute come ;) that is not HTML4. XHTML2 Object 
module has that attribute...)?