W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: The SCRIPT element

From: Francois Remy <fremycompany_pub@yahoo.fr>
Date: Wed, 16 Jul 2008 18:30:16 +0200
Message-ID: <DB4102FA0847497D9E85C0B88F85B3E8@FremyCompany1>
To: "Brad Kemper" <brkemper@comcast.net>, "Anne van Kesteren" <annevk@opera.com>
Cc: "CSS 3 W3C Group" <www-style@w3.org>

In fact, in HTML, <script> is parsed like CDATA.
And you can't display a CDATA. So I think you can't display a script.
If we consider only the HTML, Opera and IE are right, I think.

But in XML, the SCRIPT element is a normal element.
So, you can display the SCRIPT element like another one (so the comment 
should be hided)

The current way that FireFox/Safari use is a mixt of the two.
But I think the most accurate is the pure XML rendering (no comment are 
shown).

Fremy

--------------------------------------------------
From: "Brad Kemper" <brkemper@comcast.net>
Sent: Wednesday, July 16, 2008 6:19 PM
To: "Anne van Kesteren" <annevk@opera.com>
Cc: "Francois Remy" <fremycompany_pub@yahoo.fr>; "CSS 3 W3C Group" 
<www-style@w3.org>
Subject: Re: The SCRIPT element

>
> On Jul 16, 2008, at 8:58 AM, Anne van Kesteren wrote:
>
>>
>> On Wed, 16 Jul 2008 17:55:12 +0200, Francois Remy 
>> <fremycompany_pub@yahoo.fr
>> > wrote:
>>> This is not the way IE7, IE8b1 and Opera 9.5 does.
>>> But this is in fact right in FireFox 2+ and Safari 3.
>>>
>>> I also found a strange bug in Opera 9.5.
>>> If you push the "fit to screen button"
>>> (whatever the old state was), the
>>> script appears on the screen.
>>>
>>> If we have <script><!-- --></script> display, we should
>>> see no content in the script (because this is a comment
>>> that's in the script). But in Firefox and Safari, we see
>>> the <!-- --> as plain text. In Opera, after the "fit" button
>>> was pressed, we can see the "<!-- -->".
>>
>> That sounds correct for HTML, since <script> is not parsed like any 
>> other element.
>
> That seems to contradict your earlier statement:
>
>
> On Jul 16, 2008, at 8:28 AM, Anne van Kesteren wrote:
>> It's not really special in any particular way when it comes to CSS 
>> layout.
>
> If what you say is true about it being like any other element, then if 
> the script tag is set to display:block, shouldn't the comment part be 
> hidden, while still allowing borders and padding and such on the  script 
> element? 
Received on Wednesday, 16 July 2008 16:31:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:10 GMT