Re: Behavioral Extensions to CSS

>From: Bjoern Hoehrmann <derhoermi@gmx.net>
>Date: Thu, 02 Aug 2001 06:54:26 +0200
>
>* Jeffrey Yasskin wrote:
> >>[BECSS]
> >It makes it easier to attach code in an extensible way to HTML and XML
> >elements.
>
>HTML has event handlers, XHTML gets a generic events model, for XML
>there is the DOM Level 2 Events module.
>

And how do you attach these events to the XML elements? In Javascript code, 
right? Where in an XML document can you place the Javascript code to attach 
the events?

> >As the world moves to object orientation, HTML scripting is still
> >function-based.
>
>Is it? I thought it was based on the HTML document _object_ model? Well,
>if authors don't use object-orieted features ECMA-262 provides to them,
>that's nothing CSS could fix.

I was referring to attaching script to elements. Sure you can use objects 
once you've started running your script, but an HTML event looks like: 
onclick="myonclickhandler()" Where are the objects there?

>
> >A few days ago someone complained that BECSS gives code writers yet one 
>more
> >place to hide code. Have you seen Dreamweaver script lately? And that's
> >contained in the current page. If someone wants to hide code, they can do
> >it, and if someone wants to find it, they can do it. Most people only 
>care
> >if it works, and BECSS makes that more likely.
>
>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. Should CSS not have been developed for this 
reason?

>
> >So, is BECSS dead? And why don't you like it?
>
>CSS is meant to influence the _presentation_ of documents. It must not
>contain logical semantics as it should not contain any scripting
>information. Mixing scripting with presentation appears to me like
>mixing logic and structe with presentation as in HTML 3.2. What's wrong
>with
>
>   /* some script */
>   ...addEventListener("submit", submitListener, 0);
>   ...submitListener::handle_event( evt )
>   {
>     /* do something */
>   }

In what do you enclose that script block in XML? In HTML, will that 
addEventListener be in the onload event? In the top level of a <script> 
block? If it runs every time the page loads, why shouldn't it be declarative 
instead of programmatic?

In any good page, JavaScript is an extra, since users can and do turn of 
JavaScript. JavaScript is more concerned with the appearance and behavior of 
a page than it is with the content.

Ian, thanks for the update.

Jeffrey Yasskin

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

Received on Thursday, 2 August 2001 12:44:05 UTC