- From: Shane McCarron <shane@aptest.com>
- Date: Thu, 07 May 2009 06:51:08 -0500
- To: Mark Birbeck <mark.birbeck@webbackplane.com>
- CC: XHTML WG <public-xhtml2@w3.org>
I actually think those examples are just misleading / confusing, and need to be updated to reflect the new use of the @function attribute. We could re-introduce the handler element. However, I don't know what that would mean. We *need* to define the script element so we can add @implements and so that we have a consistent story about how scripts are part of the XML Events model. Mark Birbeck wrote: > Hi Shane, > > Using <script> in the way outlined in the examples (first and third > examples, section 3.3.1): > > <script type="application/x-javascript" ev:event="submit" ev:observer="form1"> > return docheck(event); > </script> > > <img src="button.gif" alt="OK"> > <script ev:event="DOMActivate" type="application/x-javascript"> > doactivate(event); > </script> > </img> > > will cause an error in current browsers, since the body of the script > tag will be executed on document load, regardless of the presence of > the @ev:* attributes. > > I realise we could argue that XML Events 2 is not supposed to work in > current browsers, but I would also argue that: > > (a) it easily could, in just the same way that we're making XForms work in > current browsers, by way of Ubiquity XForms; > > (b) support for standards in browsers is piecemeal, and uptake is patchy, so > it's advisable to create standards that can not only be built > into browsers, > but can also be implemented using script. > > I believe that a simple resolution here is to leave <script> alone to > do what it currently does in HTML, and instead to introduce a > <handler> element. Since this element is not understood by current > browsers, the content will not be interpreted as script, and > therefore, will not be executed when the document loads. > > Regards, > > Mark > > On Wed, May 6, 2009 at 3:52 PM, Shane McCarron <shane@aptest.com> wrote: > >> As per my action item, I have prepared a working draft of XML Events 2 for >> publication. It is at http://www.w3.org/MarkUp/2009/WD-xml-events-20090508/ >> >> Roland, if you give it a quick look and it seems fine, please send a >> publication request to webreq@w3.org authorizing its publication, cc me, and >> tell the pub group to work with me if there are any issues that need to get >> sorted prior to publication. >> >> Thanks! >> >> -- >> Shane P. McCarron Phone: +1 763 786-8160 x120 >> Managing Director Fax: +1 763 786-8180 >> ApTest Minnesota Inet: shane@aptest.com >> >> >> >> >> > > > > -- Shane P. McCarron Phone: +1 763 786-8160 x120 Managing Director Fax: +1 763 786-8180 ApTest Minnesota Inet: shane@aptest.com
Received on Thursday, 7 May 2009 11:51:49 UTC