Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #23491

Re: JavaScript in a PRE element of an HTML document

Path csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From "Jukka K. Korpela" <jkorpela@cs.tut.fi>
Newsgroups comp.lang.javascript
Subject Re: JavaScript in a PRE element of an HTML document
Date Mon, 10 Mar 2014 07:30:09 +0200
Organization A noiseless patient Spider
Lines 29
Message-ID <lfjil1$9kf$1@dont-email.me> (permalink)
References <JavaScript-20140308234930@ram.dialup.fu-berlin.de> <lfgsk3$hlv$1@dont-email.me> <teaching-frame-20140309152656@ram.dialup.fu-berlin.de> <lfip84$46g$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Mon, 10 Mar 2014 05:30:09 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="ad9d9996ed56b0226e850b84acbddfdf"; logging-data="9871"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19is4GQXv4BKT1JXy2EdnLZ"
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
In-Reply-To <lfip84$46g$1@dont-email.me>
X-Antivirus-Status Clean
X-Antivirus avast! (VPS 140309-1, 09.03.2014), Outbound message
Cancel-Lock sha1:nmVuafD/pgYgp0IDwyt9wQCFtjo=
Xref csiph.com comp.lang.javascript:23491

Show key headers only | View raw


2014-03-10 0:16, Denis McMahon wrote:

> It might be a good idea to add a type attribute to your script element.

No it isn't.

> I see no closing tag for the html element.

None is needed.

> I believe it is suggested that a charset line should appear as early as
> possible,

By whom? A Candidate Recommendation says: "The element containing the 
character encoding declaration must be serialized completely within the 
first 1024 bytes of the document." I don't think there's much risk of 
exceeding that limit here.

> Have you considered using a textarea as the output region, rather than an
> inline part of the document?

A textarea element is an inline element.

And it is for user input of text. Using it for mere data presentation 
was popular in the mid-1990s when web technologies were slightly more 
primitive than today.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/

Back to comp.lang.javascript | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: JavaScript in a PRE element of an HTML document "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-03-09 07:01 +0200
  Re: JavaScript in a PRE element of an HTML document "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-03-09 17:05 +0200
    Re: JavaScript in a PRE element of an HTML document Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-09 17:15 +0100
    Re: JavaScript in a PRE element of an HTML document "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-03-09 19:25 +0200
      Re: JavaScript in a PRE element of an HTML document "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-09 19:44 +0100
    Re: JavaScript in a PRE element of an HTML document Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-03-10 18:01 +0000
      Re: JavaScript in a PRE element of an HTML document "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-11 09:59 +0100
  Re: JavaScript in a PRE element of an HTML document Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-09 16:54 +0100
  Re: JavaScript in a PRE element of an HTML document Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-03-09 16:30 +0000
  Re: JavaScript in a PRE element of an HTML document Denis McMahon <denismfmcmahon@gmail.com> - 2014-03-09 22:16 +0000
    Re: JavaScript in a PRE element of an HTML document "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2014-03-10 07:30 +0200

csiph-web