Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[e] (0) Refer to ECMAScript as JavaScript more consistently; add the …
…various MIME types that JavaScript is sometimes known as.

git-svn-id: http://svn.whatwg.org/webapps@2954 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 2, 2009
1 parent 78bd8f4 commit 309ace2
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 82 deletions.
93 changes: 54 additions & 39 deletions index
Expand Up @@ -39,7 +39,7 @@
<div class=head>
<p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<h1>HTML 5</h1>
<h2 class="no-num no-toc" id=draft-recommendation-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 1 April 2009</h2>
<h2 class="no-num no-toc" id=draft-recommendation-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 2 April 2009</h2>
<p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<dl><dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -1375,7 +1375,7 @@
being referred to, they are referred to as <dfn id=content-attributes>content
attributes</dfn> for HTML and XML attributes, and <dfn id=dom-attributes>DOM
attributes</dfn> for those from the DOM. Similarly, the term
"properties" is used for both ECMAScript object properties and CSS
"properties" is used for both JavaScript object properties and CSS
properties. When these are ambiguous they are qualified as object
properties and CSS properties respectively.</p>

Expand Down Expand Up @@ -1875,16 +1875,18 @@

</dd>

<dt>ECMAScript</dt>
<dt>JavaScript</dt>

<dd>

<p>Some parts of the language described by this specification only
support ECMAScript as the underlying scripting language. <a href=#refsECMAScript>[ECMAScript]</a></p>
support JavaScript as the underlying scripting language. <a href=#refsECMA262>[ECMA262]</a></p>

<p class=note>The MIME type used to refer to ECMAScript in this
specification is <code title="">text/javascript</code>. This is a
willful violation of RFC 4329. <a href=#refsRFC4329>[RFC4329]</a></p>
<p class=note>The term "JavaScript" is used to refer to ECMA262,
rather than the official term ECMAScript, since the term
JavaScript is more widely known. Similarly, the MIME type used to
refer to JavaScript in this specification is <code title="">text/javascript</code>, since that is the most commonly
used type. This is a willful violation of RFC 4329. <a href=#refsRFC4329>[RFC4329]</a></p>

</dd>

Expand All @@ -1897,12 +1899,12 @@

</dd>

</dl><p>This specification does not require support of any particular
network transport protocols, style sheet language, scripting
language, or any of the DOM and WebAPI specifications beyond those
described above. However, the language described by this
specification is biased towards CSS as the styling language,
ECMAScript as the scripting language, and HTTP as the network
</dl><p>This specification does not <em>require</em> support of any
particular network transport protocols, style sheet language,
scripting language, or any of the DOM and WebAPI specifications
beyond those described above. However, the language described by
this specification is biased towards CSS as the styling language,
JavsScript as the scripting language, and HTTP as the network
protocol, and several features assume that those languages and
protocols are in use.</p>

Expand Down Expand Up @@ -2353,7 +2355,7 @@

<p>The <dfn id=best-representation-of-the-floating-point-number>best representation of the floating point number</dfn>
<var title="">n</var> is the string obtained from applying the
ECMAScript operator ToString to <var title="">n</var>.</p>
JavaScript operator ToString to <var title="">n</var>.</p>

<p>The <dfn id=rules-for-parsing-floating-point-number-values>rules for parsing floating point number values</dfn> are
as given in the following algorithm. As with the previous
Expand Down Expand Up @@ -8962,7 +8964,7 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
<code><a href=#navigator>Navigator</a></code>, and <code><a href=#selection-0>Selection</a></code> objects, the
various <code><a href=#barprop>BarProp</a></code> objects, the two <code>Storage</code>
objects, and the various <code><a href=#htmlcollection-0>HTMLCollection</a></code> objects. It
also includes all the WebIDL prototypes in the ECMAScript binding,
also includes all the WebIDL prototypes in the JavaScript binding,
including the <code>Document</code> object's prototype.)</li>

<!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%20src%3D%22document%22%3E%3C%2Fiframe%3E%0A%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20f%20%3D%20document.getElementsByTagName('iframe')%5B0%5D%3B%20d%20%3D%20f.contentWindow.document%3B%20%7D%3C%2Fscript%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22w(d.documentElement.innerHTML)%22%20value%3D%22dump%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cscript%3Evar%20x%20%3D%20new%20XMLHttpRequest()%3Bx.open(%26quot%3BGET%26quot%3B%2C%20%26quot%3BGET%26quot%3B)%3Bx.onreadystatechange%3Dfunction()%20%7B%20alert(x.readyState)%3B%20%7D%3Bx.send(null)%3B%3C%2Fscript%3E')%3Bd.close()%3B%20setTimeout(function()%20%7B%20d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%20%7D%2C%200)%3B%22%20value%3D%22xhr%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.onclick%20%3D%20function()%20%7B%20w('click')%20%7D%22%20value%3D%22add%20click%20handler%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3E%3Cscript%3Ei%20%3D%200%3B%20setTimeout(%26quot%3Bparent.w(i%2B%2B)%26quot%3B%2C%202000)%3C%2Fscript%3E%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%20with%20timer%22%3E -->
Expand Down Expand Up @@ -10677,7 +10679,7 @@ people expect to have work and what is necessary.
bytes of the document.</li>

<li>There can only be one character encoding declaration in the
document. <!-- conformance critiera for this one are given in
document.</li> <!-- conformance critiera for this one are given in
the XML spec, the <meta> section just after defining charset="",
and the character encoding pragma section. And actually this
statement isn't quite true, since you can have an XML one and an
Expand Down Expand Up @@ -11556,14 +11558,26 @@ o............A....e
<p>The following lists some MIME types and the languages to which
they refer:</p>

<dl><dt><code>text/javascript</code></dt>
<dl><dt><code>application/ecmascript</code></dt>
<dt><code>application/javascript</code></dt>
<dt><code>application/x-ecmascript</code></dt>
<dt><code>application/x-javascript</code></dt>
<dt><code>text/ecmascript</code></dt>
<dt><code>text/javascript</code></dt>
<dt><code>text/javascript1.0</code></dt>
<dt><code>text/javascript1.1</code></dt>
<dt><code>text/javascript1.2</code></dt>
<dt><code>text/javascript1.3</code></dt>
<dd>ECMAScript. <a href=#refsECMA262>[ECMA262]</a></dd>
<dt><code>text/javascript1.4</code></dt>
<dt><code>text/javascript1.5</code></dt>
<dt><code>text/jscript</code></dt>
<dt><code>text/livescript</code></dt>
<dt><code>text/x-ecmascript</code></dt>
<dt><code>text/x-javascript</code></dt>
<dd>JavaScript. <a href=#refsECMA262>[ECMA262]</a></dd>

<dt><code>text/javascript;e4x=1</code></dt>
<dd>ECMAScript with ECMAScript for XML. <a href=#refsECMA357>[ECMA357]</a></dd>
<dd>JavaScript with ECMAScript for XML. <a href=#refsECMA357>[ECMA357]</a></dd>

</dl><div class=impl>

Expand Down Expand Up @@ -31916,21 +31930,22 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
attribute specifies a regular expression against which the control's
<a href=#concept-fe-value title=concept-fe-value>value</a> is to be checked.</p>

<p>If specified, the attribute's value must match the <i title="">Pattern</i> production of ECMA 262's grammar. <a href=#refsECMA262>[ECMA262]</a></p>
<p>If specified, the attribute's value must match the JavaScript <i title="">Pattern</i> production. <a href=#refsECMA262>[ECMA262]</a></p>

<div class=impl>

<p><strong>Constraint validation:</strong> If the element's <a href=#concept-fe-value title=concept-fe-value>value</a> is not the empty string, and
the element's <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code>
attribute is specified and the attribute's value, when compiled as
an ECMA 262 regular expression with the <code title="">global</code>, <code title="">ignoreCase</code>, and <code title="">multiline</code> flags <em>disabled</em> (see ECMA 262,
sections 15.10.7.2 through 15.10.7.4), compiles successfully but the
resulting regular expression does not match the entirety of the
element's <a href=#concept-fe-value title=concept-fe-value>value</a>, then the
element is <a href=#suffering-from-a-pattern-mismatch>suffering from a pattern mismatch</a>. <a href=#refsECMA262>[ECMA262]</a></p>
attribute is specified and the attribute's value, when compiled as a
JavaScript regular expression with the <code title="">global</code>,
<code title="">ignoreCase</code>, and <code title="">multiline</code> flags <em>disabled</em> (see ECMA262
Edition 3, sections 15.10.7.2 through 15.10.7.4), compiles
successfully but the resulting regular expression does not match the
entirety of the element's <a href=#concept-fe-value title=concept-fe-value>value</a>, then the element is
<a href=#suffering-from-a-pattern-mismatch>suffering from a pattern mismatch</a>. <a href=#refsECMA262>[ECMA262]</a></p>

<p class=note>This implies that the regular expression language
used for this attribute is the same as that defined in ECMA 262,
used for this attribute is the same as that used in JavaScript,
except that the <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code>
attribute must match the entire value, not just any subset (somewhat
as if it implied a <code title="">^(?:</code> at the start of the
Expand Down Expand Up @@ -35453,7 +35468,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
// binding-specific interface
};</pre>

<p>In ECMAScript, two classes of objects are said to implement this
<p>In JavaScript, two classes of objects are said to implement this
interface: Numbers representing non-negative integers, and
homogeneous arrays of Numbers representing non-negative
integers. Thus, <code>[1,0,9]</code> is a
Expand All @@ -35463,11 +35478,11 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
an integer.</p>

<p>User agents must always represent <code><a href=#rowspecification>RowSpecification</a></code>s
in ECMAScript by using arrays, even if the path only has one
in JavaScript by using arrays, even if the path only has one
number.</p>

<p>The root of the tree is represented by the empty path; in
ECMAScript, this is the empty array (<code>[]</code>). Only the
JavaScript, this is the empty array (<code>[]</code>). Only the
<code title=dom-provider-getRowCount><a href=#dom-provider-getrowcount>getRowCount()</a></code> and
<code title=dom-provider-getChildAtPosition><a href=#dom-provider-getchildatposition>GetChildAtPosition()</a></code>
methods ever get called with the empty path.</p>
Expand Down Expand Up @@ -40251,12 +40266,12 @@ interface <dfn id=window>Window</dfn> {
environment.</p>

<p>If the <a href="#script's-global-object">script's global object</a> is a
<code><a href=#window>Window</a></code> object, then in JavaScript, the <code title="">this</code> keyword in the global scope must, contrary to
the ECMAScript specification, return the <code><a href=#window>Window</a></code>
object's <code><a href=#windowproxy>WindowProxy</a></code> object.</p>
<code><a href=#window>Window</a></code> object, then in JavaScript, the <code title="">this</code> keyword in the global scope must return the
<code><a href=#window>Window</a></code> object's <code><a href=#windowproxy>WindowProxy</a></code> object.</p>

<p class=note>This is a willful violation of ECMAScript edition
3. <a href=#refsECMA262>[ECMA262]</a></p>
<p class=note>This is a willful violation of the JavaScript
specification current at the time of writing (ECMAScript edition
3). <a href=#refsECMA262>[ECMA262]</a></p>

</dd>

Expand Down Expand Up @@ -40814,7 +40829,7 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
<hr></div>

<p><dfn id=event-handler-content-attributes>Event handler content attributes</dfn>, when specified, must
contain valid ECMAScript code matching the ECMAScript <code title="">FunctionBody</code> production. <a href=#refsECMA262>[ECMA262]</a></p>
contain valid JavaScript code matching the <code title="">FunctionBody</code> production. <a href=#refsECMA262>[ECMA262]</a></p>

<div class=impl>

Expand Down Expand Up @@ -41129,7 +41144,7 @@ interface <dfn id=function>Function</dfn> {
<h5 id=runtime-script-errors><span class=secno>5.5.6.5 </span>Runtime script errors</h5>

<p><em>This section only applies to user agents that support
scripting in general and ECMAScript in particular.</em></p>
scripting in general and JavaScript in particular.</em></p>

<p>Whenever a runtime script error occurs in one of the scripts
associated with a <code>Document</code>, the user agent must
Expand Down Expand Up @@ -41864,7 +41879,7 @@ interface <dfn id=function>Function</dfn> {

<p>User agents must not raise any other exceptions (other than
binding-specific exceptions, such as for an incorrect number of
arguments in an ECMAScript implementation).</p>
arguments in an JavaScript implementation).</p>

<p>This section does not define how the pages registered by these
methods are used, beyond the requirements on how to process the <var title="">url</var> value (see above). To some extent, the <a href=#navigate title=navigate>processing model for navigating across
Expand Down Expand Up @@ -62507,7 +62522,7 @@ interface <dfn id=timeouthandler>TimeoutHandler</dfn> {
object. <span class=XXX>define the actual requirements for
this method, as with the previous one.</span> That string must be
parsed using the specified <var title="">language</var> (defaulting
to ECMAScript if the third argument is omitted) and executed in the
to JavaScript if the third argument is omitted) and executed in the
scope of the <a href=#browsing-context>browsing context</a> associated with the
<code><a href=#window>Window</a></code> object on which the <code title=setTimeout>setTimeout()</code> method was invoked.</p>

Expand Down

0 comments on commit 309ace2

Please sign in to comment.