[html5] r2697 - [] (0) Define handling of MIME type charsets in <script src> external scripts
whatwg at whatwg.org
whatwg at whatwg.org
Fri Jan 23 02:19:43 PST 2009
Author: ianh
Date: 2009-01-23 02:19:42 -0800 (Fri, 23 Jan 2009)
New Revision: 2697
Modified:
index
source
Log:
[] (0) Define handling of MIME type charsets in <script src> external scripts
Modified: index
===================================================================
--- index 2009-01-23 01:11:50 UTC (rev 2696)
+++ index 2009-01-23 10:19:42 UTC (rev 2697)
@@ -9724,14 +9724,11 @@
attribute gives the character encoding of the external script
resource. The attribute must not be specified if the <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute is not present. If the
attribute is set, its value must be a valid character encoding name,
- and must be the preferred name for that encoding. <a href=#refsIANACHARSET>[IANACHARSET]</a></p>
+ must be the preferred name for that encoding, and must match the
+ encoding given in the <code title="">charset</code> parameter of the
+ <a href=#content-type-0 title=Content-Type>Content-Type metadata</a> of the
+ external file, if any. <a href=#refsIANACHARSET>[IANACHARSET]</a></p>
- <p>The encoding specified must be the encoding used by the script
- resource. If the <code title=attr-script-charset><a href=#attr-script-charset>charset</a></code>
- attribute is omitted, the character encoding of the document will be
- used. If the script resource uses a different encoding than the
- document, then the attribute must be specified.</p>
-
<p>The <dfn id=attr-script-async title=attr-script-async><code>async</code></dfn> and
<dfn id=attr-script-defer title=attr-script-defer><code>defer</code></dfn> attributes
are <a href=#boolean-attribute title="boolean attribute">boolean attributes</a> that
@@ -9872,6 +9869,13 @@
agent must act as if it had received an empty HTTP 400
response.</p>
+ <p>Once the resource's <a href=#content-type-0 title=Content-Type>Content Type
+ metadata</a> is available, if it ever is, apply the
+ <a href=#algorithm-for-extracting-an-encoding-from-a-content-type>algorithm for extracting an encoding from a
+ Content-Type</a> to it. If this returns an encoding, and the
+ user agent supports that encoding, then let <var><a href="#the-script-block's-character-encoding">the script
+ block's character encoding</a></var> be that encoding.</p>
+
<p>Once the fetching process has completed, and the script has
<dfn id=completed-loading>completed loading</dfn>, the user agent will have to complete
<a href=#when-a-script-completes-loading title="when a script completes loading">the steps described
Modified: source
===================================================================
--- source 2009-01-23 01:11:50 UTC (rev 2696)
+++ source 2009-01-23 10:19:42 UTC (rev 2697)
@@ -10243,15 +10243,12 @@
resource. The attribute must not be specified if the <code
title="attr-script-src">src</code> attribute is not present. If the
attribute is set, its value must be a valid character encoding name,
- and must be the preferred name for that encoding. <a
+ must be the preferred name for that encoding, and must match the
+ encoding given in the <code title="">charset</code> parameter of the
+ <span title="Content-Type">Content-Type metadata</span> of the
+ external file, if any. <a
href="#refsIANACHARSET">[IANACHARSET]</a></p>
- <p>The encoding specified must be the encoding used by the script
- resource. If the <code title="attr-script-charset">charset</code>
- attribute is omitted, the character encoding of the document will be
- used. If the script resource uses a different encoding than the
- document, then the attribute must be specified.</p>
-
<p>The <dfn title="attr-script-async"><code>async</code></dfn> and
<dfn title="attr-script-defer"><code>defer</code></dfn> attributes
are <span title="boolean attribute">boolean attributes</span> that
@@ -10424,6 +10421,13 @@
agent must act as if it had received an empty HTTP 400
response.</p>
+ <p>Once the resource's <span title="Content-Type">Content Type
+ metadata</span> is available, if it ever is, apply the
+ <span>algorithm for extracting an encoding from a
+ Content-Type</span> to it. If this returns an encoding, and the
+ user agent supports that encoding, then let <var>the script
+ block's character encoding</var> be that encoding.</p>
+
<p>Once the fetching process has completed, and the script has
<dfn>completed loading</dfn>, the user agent will have to complete
<span title="when a script completes loading">the steps described
More information about the Commit-Watchers
mailing list