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

[tobyink@goddamn.co.uk: Re: Using CSS for XML Events]

From: Toby A Inkster <tobyink@goddamn.co.uk>
Date: Mon, 16 Dec 2002 22:34:44 +0000
To: www-html@w3.org
Message-ID: <20021216223444.GA30476@ophelia.goddamn.co.uk>
Sorry -- sent to wrong address!

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

If I pull this SWITCH I'll be RITA HAYWORTH!!  Or a SCIENTOLOGIST!

attached mail follows:


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/?id=12
Web Page: http://www.goddamn.co.uk/tobyink/
IM:       AIM:inka80 ICQ:6622880 YIM:tobyink Jabber:tobyink@a-message.de

I smell like a wet reducing clinic on Columbus Day!


Received on Monday, 16 December 2002 17:36:11 GMT

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