Re: [ACTION-81] XML Events 2 draft updated

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
>
>
>
>



-- 
Mark Birbeck, webBackplane

mark.birbeck@webBackplane.com

http://webBackplane.com/mark-birbeck

webBackplane is a trading name of Backplane Ltd. (company number
05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
London, EC2A 4RR)

Received on Wednesday, 6 May 2009 15:52:09 UTC