W3C home > Mailing lists > Public > www-html@w3.org > December 2002

Re: Using CSS for XML Events

From: Toby Inkster <tobyink@goddamn.co.uk>
Date: Sun, 22 Dec 2002 20:46:02 -0000 (GMT)
Message-ID: <59338.81.2.120.180.1040589962.squirrel@ophelia.goddamn.co.uk>
To: <www-html@w3c.org>

Tried to send this earlier, but bounced :-(

On Mon, Dec 16, 2002 at 11:40:28AM -0600, Shelby Moore wrote:
| What is needed is some way to specify a set (a class) of elements to which
| the same listener could be assigned.  Perhaps there is some way to leverage
| CSS's selectors technology for specifying targets or using CSS to assign
| listeners to selectors.

Not a bad idea, but I don't think it should be part of CSS -- maybe
through a file with CSS-like syntax:

=========================================================
@define ("text/javascript") {
    function myPopupFunction() {
        blah...
    }
    function helloWord() {
        window.alert("Hello World");
    }
}
@import ("some_more_functions.js");
@import ("more_functions_again.pl");
a.popup
{
    onClick: myPopupFunction(attr(href));
}
========================================================

Script functions could be
@define-d within the eventsheet file, or
@import-ed. The eventsheet would then link element events to functions.

The HTML could refer to the event sheet similarly to CSS:

<link rel="Eventsheet" href="events.es" />

This could therefore be implemented by any browser that chose to
without impacting the CSS, (X)HTML, XML or ECMAScript specs.

-- 
Toby A Inkster BSc (Hons) ARCS
E-mail:   tobyink@goddamn.co.uk
PGP:      http://www.goddamn.co.uk/tobyink/node.cgi?id=12
Web Page: http://www.goddamn.co.uk/tobyink/
IM:       AIM:inka80 ICQ:6622880 YIM:tobyink Jabber:tobyink@a-message.de

Being a BALD HERO is almost as FESTIVE as a TATTOOED KNOCKWURST.
Received on Sunday, 22 December 2002 15:47:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:53 GMT