noscript

Discussion of bugs in Seamonkey
Post Reply
User avatar
Rick Bull
Posts: 76
Joined: November 10th, 2002, 12:31 pm
Location: England
Contact:

noscript

Post by Rick Bull »

I was just reading through the HTML 4.01 specs on script, and it said:

The content of a NOSCRIPT element should only be rendered by a script-aware user agent in the following cases:
  • The user agent is configured not to evaluate scripts.
  • The user agent doesn't support a scripting language invoked by a SCRIPT element earlier in the document


But if you do something like this:

Code: Select all

<script type="text/vbscript"><!--
  document.writeln("<p>Hello From VBScript<" & "/p>")
  document.close()
'--></script>
<noscript><p>Hello from plain old HTML.</p></noscript>


It (and IE and Opera) doesn't diplay the noscript section. But it should, right?
User avatar
japh
Posts: 8
Joined: November 5th, 2002, 9:03 am
Location: The Netherlands

Re: noscript

Post by japh »

Rick Bull wrote:.....

Code: Select all

<script type="text/vbscript"><!--
  document.writeln("<p>Hello From VBScript<" & "/p>")
  document.close()
'--></script>
<noscript><p>Hello from plain old HTML.</p></noscript>


It (and IE and Opera) doesn't diplay the noscript section. But it should, right?


Hmm, interesting point, because you then also want to have a means to attach the noscript element to the failing script instance. Otherwise it isn't exactly clear what should happen if you use several scripting languages a page, and only one fails.

I would rather call the lack of an associating mechanism a bug.
User avatar
Rick Bull
Posts: 76
Joined: November 10th, 2002, 12:31 pm
Location: England
Contact:

Post by Rick Bull »

Maybe, but I think what should happen is if the script can't be executed, the next <noscript> should be parsed. Then if there is another script try to execute that, and show the next <noscript> if that can't be parsed etc. Also this work in Opera:

Code: Select all

<script language="VBScript" type="text/vbscript"><!--
  document.write("Hello from VBScript")
'--></script>
<noscript>
  <p>Hello from HTML</p>
</noscript>


Although it it buggy, as if you remove the language attribute (as you have to in XHTML) it assume the script content is javascript, and parses it.
Post Reply