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: Sun, 3 Jan 1999 14:19:13 +0000 (GMT)

> Isn't embedded JavaScript wrapped with comment delimiters, "<!--" and "-->"?

These are not comment delimiters, -- is the comment delimiter, within an
SGML declaration, and possibly within a tag in general.  It's because of
this that Lynx needs broken comment modes for constructs like:

<!------>

which is one trivial comment and one unclosed one.

> (And doesn't this cause problems when there's a decrement operator
> in the Java?
             ^script

The use of comments is a backwards compatibility measure for non JS aware
browsers.  Such browsers are also likely to have faulty SGML comment parsing.
It arises because HTML was never intended to contain text which should not
be rendered, so the built in forward compatibility measures (ignore unknown
tags) break down.

!-- and --> do not create comments within a script element, as the
content model for such elements treats them as data.

reply via email to

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