W3C home > Mailing lists > Public > www-style@w3.org > August 2001

Re: Behavioral Extensions to CSS

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 02 Aug 2001 22:05:18 +0200
To: "Jeffrey Yasskin" <jyasskin@hotmail.com>
Cc: www-style@w3.org
Message-ID: <phajmtst0ejmd6qgv4dbjub7l1hrqvd59b@4ax.com>
* Jeffrey Yasskin wrote:
>And how do you attach these events to the XML elements?

That's a problem for the relevant markup language. If you really want a
generic method (and I can't see any good reason why there should be
such) introduce something similar to <?xml-stylesheet ... ?> for scripts
and not abuse CSS for this purpose.

>Where in an XML document can you place the Javascript code to attach 
>the events?

That depends, XHTML and SVG have the script element and on<event>
handlers XHTML has aswell a link element to include external scripts,

>>Does it? User agent without CSS support won't be able to make use of
>>that and scripting fails completly.
>The same could have been said about basic CSS when it was released. No 
>browsers had CSS support, and using pure CSS meant your pages looked 
>horrible in plain HTML browsers.

If they were horribly marked up, possibly, but pages didn't break
without CSS support.

>Should CSS not have been developed for this reason?

You want to require support for _two_ supplemental technologies to make
use of _one_ supplemental technologie, that's nonsense.

>>   /* some script */
>>   ...addEventListener("submit", submitListener, 0);
>>   ...submitListener::handle_event( evt )
>>   {
>>     /* do something */
>>   }
>In what do you enclose that script block in XML?

As I said, that depends on the document language.

>In HTML, will that addEventListener be in the onload event?

Please read the DOM Level 2 Events recommendation.

>In any good page, JavaScript is an extra, since users can and do turn of 

As they may turn of style sheets. Where is your point? Did you ever
heard people complaining that CSS doesn't work in NN4 you deactivate

>JavaScript is more concerned with the appearance and behavior of 
>a page than it is with the content.

As is CSS.
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/
Received on Thursday, 2 August 2001 16:10:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:10 GMT