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 11:27:17 +0000 (GMT)

> Since Lynx doesn't interpret embedded JavaScript, shouldn't it render it
> like <pre> ... </pre> ?

No.  Javascript aware applications, like Lynx, without Javascript capability,
or with it disabled (unless you keep strictly up to date with security patches,
you should do this for IE4++ and, I think, NS4) should skip the script content
(but display noscript sections).  As script isn't cleanly backward compatible,
the coding guidelines for Javascript say that you should wrap the actual
code in an SGML comment.

In any case, in well written Javascript HTML, most of the Javascript is
either in attribute values or the HEAD section and wouldn't be displayed
anyway.  Although I have used it in the body, probably the main use of 
body scripting is to generate browser specific HTML, often by illegal use
of script**.

++ Unpatched versions of IE4.01 allow a rogue web site to upload any files
readable by the browser user.  There are likely to be symptoms of the
process, but most users won't know what is normal.

** In valid HTML the result of deleting a script element should still be
valid HTML, but people often have script which generates an open tag and
a separate script that handles a close tag; it's not even possible to
parse the result unless you interpret the script, if, as is not uncommon,
the intervening HTML is dependent on the script generated tags.

reply via email to

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