Skip to content
Permalink
Browse files
[] (0) Define handling of MIME type charsets in <script src> external…
… scripts

git-svn-id: http://svn.whatwg.org/webapps@2697 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 23, 2009
1 parent f888f9b commit e5b022e864f9f61556e9c0f0b446be8bc4db6503
Showing with 22 additions and 14 deletions.
  1. +11 −7 index
  2. +11 −7 source
18 index
@@ -9724,13 +9724,10 @@ people expect to have work and what is necessary.
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>

<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>
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 <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
@@ -9872,6 +9869,13 @@ people expect to have work and what is necessary.
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
18 source
@@ -10243,15 +10243,12 @@ people expect to have work and what is necessary.
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 @@ people expect to have work and what is necessary.
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

0 comments on commit e5b022e

Please sign in to comment.