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

Suggestion: <link rel="script">

From: Clover Andrew <aclover@1value.com>
Date: Wed, 22 Aug 2001 11:32:30 +0200
Message-ID: <D58B0195B58937489E89124469E57CA20D5095@EX1.1value.com>
To: <www-html@w3.org>
While we're all holding our breath waiting for Cyril, Esq. to
complete his latest Symbolic Names masterpiece, here's another
quick idea.

  <script> is undesirably overloaded. It is used to include
  embedded scripts in a document as well as to link to external

  Before XHTML, the latter usage also requires an unnecessary
  end-tag, with disastrous effects when forgotten by beginners.

  DOM Level 2 Events allow authors to set event bindings in
  their own scripts (addEventListener) rather than in the
  document (onsomeevent=""). This is desirable for encapsulation
  and use of multiple component scripts on the same page. But
  the script still needs to be called somehow, either by using
  <body onload> or by putting the script at the bottom of the

  a new <link> type for scripts which could be used in the
  <head> in the same way as <link rel="stylesheet">. The script
  would executed when the page has been fully received.

  Links to stylesheets and scripts would be consistent. script
  links could also take advantage of media descriptors.

  <script src> could be deprecated, leaving <script> analogous
  to <style>.

  Purity - an HTML file with styling and scripting could finally
  be written with no inline or embedded content in other
  languages. Content-Script-Type could be avoided.

  Automated file scanners which tried to remove active content
  but were unaware of <link rel="script"> would be compromised.


Andrew Clover
Technical Consultant
Received on Wednesday, 22 August 2001 05:35:28 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:57 UTC