[whatwg] rel="script"

Simon Pieters zcorpan at hotmail.com
Sun Jul 31 08:53:11 PDT 2005


Hi,

I was wondering about rel="script". It could work like rel="stylesheet", and 
we could possibly introduce rel="alternate script" but I'm not sure how that 
would work.

rel="script" was mentioned in a spec[1] for scripts in HTML3, and there's a 
comment about it[2] in the HTML4 DTD, but it's not part of the list of link 
types[3] in the HTML4 spec.

|  Relationship values can be used in principle:
|
|   a) for document specific toolbars/menus when used
|      with the LINK element in document head e.g.
|        start, contents, previous, next, index, end, help
|   b) to link to a separate style sheet (rel=stylesheet)
|   c) to make a link to a script (rel=script)
|   d) by stylesheets to control how collections of
|      html nodes are rendered into printed documents
|   e) to make a link to a printable version of this document
|      e.g. a postscript or pdf version (rel=alternate media=print)

A use case could be for javascript links, for instance:

|<a rel="script" href="javascript:alert('pass')">foo</a>

It appears[4] that IE6, Deer Park Alpha 2, and Opera 8.01 doesn't support:

|<link rel="script" href="script.js">

Regards,
Simon Pieters

[1] http://www.w3.org/TR/WD-script-960124.html#scripts
[2] http://www.w3.org/TR/html4/sgml/dtd.html
[3] http://www.w3.org/TR/html4/types.html#type-links
[4] http://zcorpan.1go.dk/test/rel=script/001.html





More information about the whatwg mailing list