- From: Scott Matthewman <scottm@danielson.co.uk>
- Date: Thu, 10 Jul 1997 11:59:17 +0100
- To: <www-html@w3.org>, "MegaZone" <megazone@livingston.com>
> Once upon a time Scott Matthewman shaped the electrons to say... > >I do think, though, that the insertion of script events into tags should be > >discouraged more firmly, to be replaced by binding from a script in the > ><HEAD> element. Individual event attributes in tags should be deprecated, > >to be replaced by a SCRIPT attribute, in much the same way as the STYLE > >attribute can incorporate style changes. > > You must have a way to bind event handlers to elements - no way around that. > All the event handlers define are the crossover points between HTML and the > scripting language. Note that the language itself is NOT defined - only > the event handlers. These are universal elements and I consider them no > different from a CLASS attribute. Yup, I agree. I *thought* I'd said so: | But the content of HTML is by its very nature interactive, so there needs | to be some means of applying controls to certain events. Specifying which | events a UA should monitor in the DTD will help to standardise function | across platforms. Apologies if my original post wasn't clear! I just don't see why each event handler requires a separate attribute. > You can inline scripts, sure - you can also inline style sheets. Sometimes > an inline script makes more sense. A simple status bar change can be inlined > more efficiently then calling it as a seperate function. But a large rollover > image array script should be called seperately. Note that you can already > use the SRC attribute on a SCRIPT element to call an external script. Personally, I think the <SCRIPT SRC="myscript.js"></SCRIPT> is messy - it certainly goes against the spirit, if not the letter of HTML! [Since I started writing this, I've received Liam Quinn's post, which suggests a <LINK> alternative - I agree!] > >1) Main document, including text, graphics and hyperlinks > >2) Style sheet, governing presentational output > >3) Script, governing interactivity. > > To me this does not make sense. Style sheets and scripts can be called as > external files when it makes sense, they can be included in header blocks > when it makes sense, and they can be inlined when in makes sense. Exactly - but most of the time it makes sense to separate the three, while retaining relationships between them.
Received on Thursday, 10 July 1997 07:00:17 UTC