Permalink
Browse files

Fix authoring guidance to allow async="" on inline module scripts

Closes #3319.
  • Loading branch information...
domenic committed Jan 5, 2018
1 parent 50c65e0 commit 271f19c34786db04a17c16c24807a33113894a68
Showing with 10 additions and 7 deletions.
  1. +10 −7 source
View
17 source
@@ -57224,13 +57224,16 @@ interface <dfn>HTMLScriptElement</dfn> : <span>HTMLElement</span> {
a <span>classic script</span>, to be interpreted according to the JavaScript <i
data-x="js-prod-Script">Script</i> top-level production. Classic scripts are affected by the
<code data-x="attr-script-async">async</code> and <code data-x="attr-script-defer">defer</code>
attributes. Authors should omit the attribute instead of redundantly setting it.</p></li>
attributes, but only when the <code data-x="attr-script-src">src</code> attribute is set.
Authors should omit the <code data-x="attr-script-type">type</code> attribute instead of
redundantly setting it.</p></li>
<li><p>Setting the attribute to an <span>ASCII case-insensitive</span> match for the string
"<code data-x="">module</code>" means that the script is a <span>module script</span>, to be
interpreted according to the JavaScript <i data-x="js-prod-Module">Module</i> top-level
production. Module scripts are not affected by the <code data-x="attr-script-defer">defer</code>
attribute.</p></li>
attribute, but are affected by the <code data-x="attr-script-async">async</code> attribute
(regardless of the state of the <code data-x="attr-script-src">src</code> attribute).</p></li>
<li><p>Setting the attribute to any other value means that the script is a <dfn>data
block</dfn>, which is not processed. None of the <code>script</code> attributes (except <code
@@ -57282,11 +57285,11 @@ interface <dfn>HTMLScriptElement</dfn> : <span>HTMLElement</span> {
data-x="attr-script-defer">defer</code></dfn> attributes are <span data-x="boolean
attribute">boolean attributes</span> that indicate how the script should be evaluated. <span
data-x="classic script">Classic scripts</span> may specify <code
data-x="attr-script-defer">defer</code> or <code data-x="attr-script-async">async</code>; <span
data-x="module script">module scripts</span> may specify <code
data-x="attr-script-async">async</code>. The <code data-x="attr-script-defer">defer</code> and
<code data-x="attr-script-async">async</code> attributes must not be specified if the <code
data-x="attr-script-src">src</code> attribute is not present.</p>
data-x="attr-script-defer">defer</code> or <code data-x="attr-script-async">async</code>, but must
not specify either unless the <code data-x="attr-script-src">src</code> attribute is present.
<span data-x="module script">Module scripts</span> may specify the <code
data-x="attr-script-async">async</code> attribute, but must not specify the <code
data-x="attr-script-defer">defer</code> attribute.</p>
<p>There are several possible modes that can be selected using these attributes, and depending on
the script's type.</p>

0 comments on commit 271f19c

Please sign in to comment.