<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
code
        {font-family:"Courier New";}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.Stylwiadomocie-mail17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=PL link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><a
href="http://www.whatwg.org/specs/web-apps/current-work/#script"><span
lang=EN-US>3.17.1. The script element</span></a></span></font><font size=2
face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:Arial'>
specification says:<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><code><font size=2
face="Courier New"><span style='font-size:10.0pt'><a
href="http://www.whatwg.org/specs/web-apps/current-work/#defer"><span
lang=EN-US>defer</span></a></span></font></code><span lang=EN-US> (if the </span><code><font
size=2 face="Courier New"><span style='font-size:10.0pt'><a
href="http://www.whatwg.org/specs/web-apps/current-work/#src10"><span
lang=EN-US>src</span></a></span></font></code><span lang=EN-US> attribute is
present) <o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><code><font size=2
face="Courier New"><span style='font-size:10.0pt'><a
href="http://www.whatwg.org/specs/web-apps/current-work/#async"><span
lang=EN-US>async</span></a></span></font></code><span lang=EN-US> (if the </span><code><font
size=2 face="Courier New"><span style='font-size:10.0pt'><a
href="http://www.whatwg.org/specs/web-apps/current-work/#src10"><span
lang=EN-US>src</span></a></span></font></code><span lang=EN-US> attribute is
present) <o:p></o:p></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><code><font size=2
face="Courier New"><span style='font-size:10.0pt'><a
href="http://www.whatwg.org/specs/web-apps/current-work/#type11"></a></span></font></code><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>I understand that the async attribute must depend on
the src attribute because it is needed and meaningful only when the script
element is loaded from an external source; however, the advantage of using the
defer attribute is not limited to that case. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>Consider the following example:<o:p></o:p></span></font></p>

<pre style='margin-left:35.4pt'><font size=2 face="Courier New"><span
lang=EN-US style='font-size:10.0pt'><script type="text/javascript" defer><o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span lang=EN-US
style='font-size:10.0pt'>function ha8validate(p5event) { return true }<o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span lang=EN-US
style='font-size:10.0pt'>document.forms[0].onsubmit = ha8validate<o:p></o:p></span></font></pre><pre
style='margin-left:35.4pt'><font size=2 face="Courier New"><span lang=EN-US
style='font-size:10.0pt'></script><o:p></o:p></span></font></pre>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>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.  <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>Therefore, the defer attribute can be meaningful
without the src attribute and the dependency should be removed.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>Yours sincerely<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>Christopher Yeleighton<o:p></o:p></span></font></p>

</div>

</body>

</html>