- From: Simon Pieters <simonp@opera.com>
- Date: Thu, 15 May 2008 01:57:51 +0200
- To: "Ian Hickson" <ian@hixie.ch>
- Cc: "public-html@w3.org" <public-html@w3.org>
On Thu, 15 May 2008 00:06:31 +0200, Ian Hickson <ian@hixie.ch> wrote: >> Things authors put in <script src> deliberatly: >> >> A: An empty comment, ";", "var dummy=0;", etc, as a way to prevent >> their >> server side XSLT to emit "<script ... />" (though most empty >> comments >> are likely just cargo cult). Banning this means that authors have to >> change their backend in order to move to HTML5, which seems to be an >> unnecessary blocker for adoption. >> >> B: A comment containing a description of the script and/or copyright >> information. Moving this comment to outside the script element seems >> pointless and has less chance of surviving copy-paste, and I'd >> imagine >> authors would get stumped when the comment says "This notice MUST >> stay >> intact for legal use". >> >> C: Empty function declarations with the same names as the functions >> declared in the external script. Personally I find this slightly >> confusing and would rather put them in a comment. > > All of the above can use a comment, which is allowed (in the XML variant, > at least -- you can't put a comment in the text/html variant). I didn't mean comment as in a DOM Comment node, but rather as in a javascript comment. > For A, would a single space work? I guess that depends on whether there's whitespace mangling down the toolchain. > I suppose we could allow /* ... */, but that seems oddly specific... The spec could allow any text and conformance checkers could compete on being useful. Or the spec can be oddly specific. :-) Note though that // and <!-- are also javascript comments. -- Simon Pieters Opera Software
Received on Wednesday, 14 May 2008 23:58:40 UTC