lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev question about embedded javascript


From: David Woolley
Subject: Re: lynx-dev question about embedded javascript
Date: Wed, 6 Jan 1999 08:35:59 +0000 (GMT)

> 
> Well, if "HTML was never intended to contain text which should not be
> rendered", why the specs for HTML 2.0, 3.0 and 4.0 say

By text not to be rendered I didn't mean comments, I meant text outside
of any <...>.  It is the fact that comments are not rendered that is
used as a hack to protect inline Javascript from rendering (although
a Javascript aware browser will not recognize HTML/SGML comments but
will pass the <-- to the Javascript parser).

The idea of HTML was that you took a piece of plain text that was, to
some extent, useable directly and added markup to make it more useful.
Inline script is not directly useable and the markup actually suppresses
its display, rather than modifying it.

The sections you quote on comments are there because:

1) people didn't understand that HTML was SGML and were imitating comments
   without undertanding their true, rather complex, structure;

2) the original HTML spec didn't say anything about comments, compounding
   the above problem (it was probably written by people who understood SGML,
   and didn't need to be told such details).

Not that, in SGML, the comments are comments on the declaration, not on
the document as a whole.  HTML usage is to use null declarations as a carrier
for the comments, but if you look at the HTML DTDs you will see comments of
the more general form.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]