[whatwg] Apply script.defer to internal scripts

On Tue, 27 Mar 2007 21:49:41 +0200, Kristof Zelechovski  
<giecrilj at stegny.2a.pl> wrote:

> Consider the following example:
>
> <script type="text/javascript" defer>
> function ha8validate(p5event) { return true }
> document.forms[0].onsubmit = ha8validate
> </script>
>
> The script embedded here is so short and specific that it makes no sense
> relaying it to an external location; however, if the script is not  
> deferred, the script fails with an exception at run time because the  
> document body is not constructed yet.

What's wrong with simply placing it after </body>?


-- 
Alexey Feldgendler <alexey at feldgendler.ru>
[ICQ: 115226275] http://feldgendler.livejournal.com

Received on Wednesday, 28 March 2007 15:35:39 UTC