Re: [CSS3] What about "behavioral extensions to CSS"?

Daniel Glazman wrote :
> I am one of the BECSS authors. This spec is dead now, and you should take
> a look at XBL and XBL2.
> 
> http://www.mozilla.org/projects/xbl/xbl2.html
> 
> </Daniel>
> 

Hello, and thank you for your reply.

Although I haven't read the XBL spec in much detail, it seems to me like 
a quite complex - though complete - specification.

My point is that, even if it may be well suited for development of a 
huge application, it is too complex for the simple purpose of just 
attaching some events to (X)HTML elements.
As I said in my previous mail, the @script syntax and the onevent: 
"something()" syntax are quickly explained, and easy to understand and 
use. They allow to easily separate the scripts used for presentation 
purposes (like some animation when you hover the mouse over some link) 
from the core scripting of the web application, and thus, probably cover 
most of the web developper's need.

This part of the BECSS extension is probably easy to implement by UAs 
(as i said in my previous mail), since it only makes use of the existing 
parsers, so if it becomes a Recommandation, we can hope that it will be 
implemented soon after that in most browsers.
On the other hand, since the XBL language is more complex, it won't be 
implemented by other UAs than Mozilla in a long time (if ever). It won't 
allow cross browser scripting.

About the "behavior" and "HTML components" parts of the BECSS 
specification, I am not really sure if it is needed for such a simple 
purpose, either. They are more like XBL, though less complex, allowing 
to specify how the components will react, wich maybe should not be 
specified in CSS, since it is not really presentation, but behavior.

Now, to allow the use of different presentation scripts for different 
style sheets, there could also be some simple syntaxes like:
   @script-onload {...} and
   @script-onunload {...}
These would execute some code on initialisation and cleaning (for 
example to clear some timeout that could be set for an animation) when 
the CSS file is loaded and unloaded again on a page (wich sometimes happen).

So maybe we could keep those two simple syntaxes from the BECSS spec or 
integrate them in another CSS module?

Jordan OSETE

Received on Friday, 5 May 2006 20:18:38 UTC