- From: Clover Andrew <aclover@1value.com>
- Date: Thu, 23 Aug 2001 10:20:49 +0200
- To: <www-html@w3.org>
William F. Hammond <hammond@csc.albany.edu> wrote: > Scripts in any form are of interest only if I think > that it is a good idea to allow unknown strangers to > write programs that run on my computer. Well, obviously. (But crass though the majority of current scripts are, there is undeniably *some* use for scripting.) > Hello. Morning! fantasai <fantasai@escape.com> wrote: > c) to make a link to a script (rel=script) > Didn't quite make it to the prose... Interesting! I never noticed that. It would indeed seem to be a fairly obvious application of link. Christian Wolfgang Hujer <Christian.Hujer@itcqis.com> wrote: > So <link rel="Script" .../> could not be used anywhere > throughout the document. Indeed. The main use of mid-document scripts is document.write(), which hopefully we can move away from thanks to DOM Core; HTML can now be written to work without scripting, and then transformed in the initialisation phase of linked scripts. There are of course drawbacks to this, principally that it is hard in current implementations to associate additional data that the script might need with document elements. XML Namespaces would be a solution given UA support. Another problem is that DOM selection methods are not as powerful as W3 Selectors; particularly missed is something like getElementsByClass - or a less HTML-specific version, getElementsByAttribute. Behaviours solve both these problems, but in a way I personally greatly dislike. Keeping style, scripting, and content completely separated is my goal. On a related note, I find the <noscript> element completely useless as it stands. There is no type attribute to say which kind of script couldn't be executed, and even if there were there are so many versions of ECMAScript that it's generally impossible to know whether a script can or cannot be executed before letting it browser- or object-sniff. Anyway. -- Andrew Clover Technical Consultant 1VALUE.com AG
Received on Thursday, 23 August 2001 04:23:44 UTC