[Bug 10068] Suggest making noscript obsolete but conforming

http://www.w3.org/Bugs/Public/show_bug.cgi?id=10068





--- Comment #65 from Aryeh Gregor <Simetrical+w3cbug@gmail.com>  2010-08-25 18:45:11 ---
(In reply to comment #63)
> It's simple enough to provide fallback content that is removed with JavaScript
> without the need for a noscript element:
> 
> Markup:
> <div id="nojs">
>   <h2>JavaScript Required</h2>
>   <p>Unfortunately, Javascript is required to use this application.
> Alternatively, you can use the <a href="...">Flash version of XYZ</a> or <a
> href="...">some other version</a> of the game we have lovingly prepared for
> you.</p>
> </div>
> 
> JavaScript:
> var objRemove = document.getElementById('nojs');
> objRemove.parentElement.removeChild(objRemove);

Then the content will briefly appear on page load before disappearing.  You
could solve this by something like

<script>document.write("<style>.nojs { display: none }</style>");</script>

and then use class="nojs", but <noscript> is easier and more standard, and has
no disadvantages that I'm aware of.  The major use-case here is something like
a game that can have no meaningful graceful degradation -- what's the point in
forcing authors to roll their own <noscript> in that case?  As your code
demonstrates, non-<noscript> ways to do this are likely to be buggy or flawed.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 25 August 2010 18:45:15 UTC