Skip to content

Commit

Permalink
Created multi-page version. Fixes #5.
Browse files Browse the repository at this point in the history
Fixes: #5

Thanks mathiasbynens for asking. And thanks Philip Taylor for writing the
HTML5 spec-splitter script (repurposed here with some modifications).
  • Loading branch information
sideshowbarker committed Aug 15, 2011
1 parent f6c8cdd commit 0d6451e
Show file tree
Hide file tree
Showing 30 changed files with 69,769 additions and 35,766 deletions.
1,542 changes: 1,542 additions & 0 deletions A.html

Large diffs are not rendered by default.

607 changes: 607 additions & 0 deletions B.html

Large diffs are not rendered by default.

223 changes: 223 additions & 0 deletions C.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
<!DOCTYPE html>
<html class="split chapter"><head><meta charset="utf-8"><title>Annex C (informative) The Strict Mode of ECMAScript # &#9417; &#9402; &#9312; &#9398; &#8212; Annotated ES5</title><link rel="stylesheet" href="style.css"><link rel="shortcut icon" href="favicon.ico"><link href="B.html" title="Annex B (informative) Compatibility " rel="prev">
<link href="index.html#contents" title="TOC" rel="index">
<link href="D.html" title="Annex D (informative) Corrections and Clarifications in the 5th Edition with Possible 3rd Edition Compatibility Impact " rel="next">
</head><body><div class="head">
<h2 id="top">Annotated ECMAScript 5.1 <span id="timestamp"></span></h2>
<div id="mascot-treehouse">
<img id="mascot" align="left" src="js-mascot.svg" alt=""><img id="bubble" src="bubble.svg" alt=""></div>
<p id="slogan">&#8223;Ex igne vita&#8221;</p>
<div id="annotations"></div>
<script src="timestamp.js"></script></div>
<nav>
<a href="B.html">&#8592; Annex B (informative) Compatibility </a> &#8211;
<a href="index.html#contents">TOC</a> &#8211;
<a href="D.html">Annex D (informative) Corrections and Clarifications in the 5th Edition with Possible 3rd Edition Compatibility Impact &#8594;</a>
</nav>

<h2 id="C">Annex C (informative) The Strict Mode of ECMAScript <a href="#C">#</a> <a href="#C-toc" class="bak">&#9417;</a> <b class="erra">&#9402;</b> <b class="rev1">&#9312;</b> <b class="anno">&#9398;</b></h2>
<p>
<strong>The
strict mode restriction and exceptions</strong></p>
<ul><li>The identifiers "<code><b>implements</b></code>", "<code><b>interface</b></code>",
"<code><b>let</b></code>", "<code><b>package</b></code>", "<code><b>private</b></code>",
"<code><b>protected</b></code>", "<code><b>public</b></code>", "<code><b>static</b></code>", and
"<code><b>yield</b></code>" are classified as <i>FutureReservedWord</i> tokens
within strict mode code. (<a>7.6.12</a> [?]<!-- FIXME -->).</li>
<li><p>
A
conforming implementation, when processing <a href="x10.html#x10.1.1" class="term-ref">strict mode code</a>, may
not extend the syntax of <i>NumericLiteral</i>
(<a href="x7.html#x7.8.3">7.8.3</a>) to include <i>OctalIntegerLiteral</i>
as described in <a href="B.html#B.1.1">B.1.1</a>.</p>
</li>
<li><p>
A
conforming implementation, when
processing <a href="x10.html#x10.1.1" class="term-ref">strict mode code</a> (see <a href="x10.html#x10.1.1">10.1.1</a>), may not extend the syntax
of <i>EscapeSequence</i> to
include <i>OctalEscapeSequence</i>
as described in <a href="B.html#B.1.2">B.1.2</a>.</p>
</li>
<li><p>
Assignment
to an undeclared identifier or otherwise <a href="x8.html#IsUnresolvableReference">unresolvable reference</a>
does not create a property in the <a href="x15.html#x15.1" class="term-ref">global object</a>. When a simple
assignment occurs within <a href="x10.html#x10.1.1" class="term-ref">strict mode code</a>, its <i>LeftHandSide </i>must not evaluate to an
unresolvable Reference. If it does a <b><a href="x15.html#x15.11.6.3" class="term-ref">ReferenceError</a></b>
exception is thrown (<a href="x8.html#x8.7.2">8.7.2</a>). The <i>LeftHandSide </i>also
may not be a reference to a data property with the attribute value
{[[Writable]]:<b>false</b>},
to an accessor property with the attribute value
{[[Set]]:<b>undefined</b>},<b>
</b>nor to a non-existent
property of an object whose [[Extensible]] internal property has
the value <b>false</b>.
In these cases a <code><b><a href="x15.html#x15.11.6.5" class="term-ref">TypeError</a></b></code>
exception is thrown (<a href="x11.html#x11.13.1">11.13.1</a>).</p>
</li>
<li><p>
The
identifier <code><b>eval</b></code>
or <code><b>arguments</b></code>
may not appear as the <i>LeftHandSideExpression</i>
of an Assignment operator (<a href="x11.html#x11.13">11.13</a>) or of a <i>PostfixExpression</i>
(<a href="x11.html#x11.3">11.3</a>) or as the <i>UnaryExpression</i>
operated upon by a Prefix Increment (<a href="x11.html#x11.4.4">11.4.4</a>) or a Prefix Decrement
(<a href="x11.html#x11.4.5">11.4.5</a>) operator.
</p>
</li>
<li><p>
Arguments
objects for strict mode functions define non-configurable accessor
properties named "<code><b>caller</b></code>"
and "<code><b>callee</b></code>"
which throw a <b><a href="x15.html#x15.11.6.5" class="term-ref">TypeError</a></b> exception on access
(<a href="x10.html#x10.6">10.6</a>).</p>
</li>
<li><p>
Arguments
objects for strict mode functions do not dynamically share their
array indexed property values with the corresponding formal
parameter bindings of their functions. (<a href="x10.html#x10.6">10.6</a>).</p>
</li>
<li><p>
For
strict mode functions, if an arguments object is created the
binding of the local identifier <code><b>arguments</b></code>
to the arguments object is immutable and hence may not be the
target of an assignment expression. (<a href="x10.html#x10.5">10.5</a>).</p>
</li>
<li><p>
It
is a <b><a href="x15.html#x15.11.6.4" class="term-ref">SyntaxError</a></b>
if <a href="x10.html#x10.1.1" class="term-ref">strict mode code</a> contains an
<i>ObjectLiteral</i> with
more than one definition of any data property (<a href="x11.html#x11.1.5">11.1.5</a>).</p>
</li>
<li><p>
It
is a <b><a href="x15.html#x15.11.6.4" class="term-ref">SyntaxError</a></b>
if the <i>Identifier</i>
<code><b>"eval"</b></code>
or the <i>Identifier </i><code><b>"arguments"</b></code>
occurs as the <i>Identifier</i>
in a <i>PropertySetParameterList</i><code><b>
</b></code>of a
<i>PropertyAssignment</i>
that is contained in <a href="x10.html#x10.1.1">strict code</a> or
if its <i><a href="x13.html#x13">FunctionBody</a></i> is
<a href="x10.html#x10.1.1">strict code</a> (<a href="x11.html#x11.1.5">11.1.5</a>).</p>
</li>
<li><p>
Strict
mode <a href="x10.html#eval-code">eval code</a> cannot <a href="x10.html#x10.5">instantiate variables or functions</a> in the
variable environment of the caller to eval. Instead, a new variable
environment is created and that environment is used for declaration
binding instantiation for the <a href="x10.html#eval-code">eval code</a> (<a href="x10.html#x10.4.2">10.4.2</a>).</p>
</li>
<li><p>
If
<b>this</b>
is evaluated within <a href="x10.html#x10.1.1" class="term-ref">strict mode code</a>, then the <b>this
</b>value is not coerced to
an object. A <b>this</b>
value of <b>null</b>
or <b>undefined</b>
is not converted to the <a href="x15.html#x15.1" class="term-ref">global object</a> and <a href="x4.html#primitive_value" class="term-ref">primitive value</a>s are not
converted to wrapper objects. The <b>this</b>
value passed via a function call (including calls made using
<code><b><a href="x15.html#x15.3.4.3">Function.prototype.apply</a></b></code>
and <code><b><a href="x15.html#x15.3.4.4">Function.prototype.call</a></b></code><b>)</b>
do not coerce the passed this value to an object (<a href="x10.html#x10.4.3">10.4.3</a>, <a href="x11.html#x11.1.1">11.1.1</a>,
<a href="x15.html#x15.3.4.3">15.3.4.3</a>, <a href="x15.html#x15.3.4.4">15.3.4.4</a>).</p>
</li>
<li><p>
When
a <code><b>delete</b></code>
operator occurs within <a href="x10.html#x10.1.1" class="term-ref">strict mode code</a>,
a <b><a href="x15.html#x15.11.6.4" class="term-ref">SyntaxError</a></b> is thrown if its
<i>UnaryExpression</i> is a
direct reference to a variable, function argument, or function
name(<a href="x11.html#x11.4.1">11.4.1</a>).</p>
</li>
<li><p>
When
a <code><b>delete</b></code>
operator occurs within <a href="x10.html#x10.1.1" class="term-ref">strict mode code</a>, a <b><a href="x15.html#x15.11.6.5" class="term-ref">TypeError</a></b>
is thrown if the property to
be deleted has the attribute { [[Configurable]]:<b>false</b>
} (<a href="x11.html#x11.4.1">11.4.1</a>).</p>
</li>
<li><p>
It
is a <b><a href="x15.html#x15.11.6.4" class="term-ref">SyntaxError</a></b>
if a <i>VariableDeclaration</i>
or <i>VariableDeclarationNoIn</i>
occurs within <a href="x10.html#x10.1.1">strict code</a> and its <i>Identifier</i>
is <code><b>eval</b></code><b>
</b>or<b>
</b><code><b>arguments</b></code>
(<a href="x12.html#x12.2.1">12.2.1</a>).</p>
</li>
<li><p>
Strict
mode code may not include a <i>WithStatement</i>.
The occurrence of a <i>WithStatement</i>
in such a context is an <b><a href="x15.html#x15.11.6.4" class="term-ref">SyntaxError</a></b>
(<a href="x12.html#x12.10">12.10</a>).</p>
</li>
<li><p>
It
is a <b><a href="x15.html#x15.11.6.4" class="term-ref">SyntaxError</a></b> if a <i>TryStatement</i>
with a <i>Catch</i>
occurs within <a href="x10.html#x10.1.1">strict code</a> and the <i>Identifier</i>
of the <i>Catch</i>
production is <code><b>eval</b></code>
or <code><b>arguments</b></code>
(<a href="x12.html#x12.14.1">12.14.1</a>)</p>
</li>
<li><p>
It
is a <b><a href="x15.html#x15.11.6.4" class="term-ref">SyntaxError</a></b> if the identifier <code><b>eval</b></code>
or <code><b>arguments</b></code>
appears within a <i>FormalParameterList</i>
of a strict mode <i>FunctionDeclaration</i>
or <i>FunctionExpression</i>
(<a href="x13.html#x13.1">13.1</a>)</p>
</li>
<li><p>
A
strict mode function may not have two or more formal parameters
that have the same name. An attempt to create such a function using
a <i>FunctionDeclaration</i>,
<i>FunctionExpression</i>, or
<code><b>Function</b></code>
constructor is a <b><a href="x15.html#x15.11.6.4" class="term-ref">SyntaxError</a></b>
(<a href="x13.html#x13.1">13.1</a>, <a href="x15.html#x15.3.2">15.3.2</a>).</p>
</li>

<li><p>
An
implementation may not extend, beyond that defined in this specification,
meanings within strict mode functions of properties named <code><b>caller</b></code>
or <code><b>arguments</b></code>
of function instances. ECMAScript code may not create or modify
properties with these names on function objects that correspond to
strict mode functions
(<a href="x10.html#x10.6">10.6</a>, <a href="x13.html#x13.2">13.2</a>, <a href="x15.html#x15.3.4.5.3">15.3.4.5.3</a>).</p>
</li>

<li><p>
It
is a <b><a href="x15.html#x15.11.6.4" class="term-ref">SyntaxError</a></b>
to use within <a href="x10.html#x10.1.1" class="term-ref">strict mode code</a> the identifiers <code><b>eval</b></code>
or <code><b>arguments</b></code>
as the <i>Identifier</i> of a
<i>FunctionDeclaration</i> or
<i>FunctionExpression</i> or
as a formal parameter name (<a href="x13.html#x13.1">13.1</a>). Attempting to dynamically define
such a strict mode function using the <code><b>Function</b></code>
constructor (<a href="x15.html#x15.3.2">15.3.2</a>) will throw a <b><a href="x15.html#x15.11.6.4" class="term-ref">SyntaxError</a></b>
exception.</p>
</li></ul></body><script src="anno.js"></script></html>
95 changes: 95 additions & 0 deletions D.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<!DOCTYPE html>
<html class="split chapter"><head><meta charset="utf-8"><title>Annex D (informative) Corrections and Clarifications in the 5th Edition with Possible 3rd Edition Compatibility Impact # &#9417; &#9402; &#9312; &#9398; &#8212; Annotated ES5</title><link rel="stylesheet" href="style.css"><link rel="shortcut icon" href="favicon.ico"><link href="C.html" title="Annex C (informative) The Strict Mode of ECMAScript " rel="prev">
<link href="index.html#contents" title="TOC" rel="index">
<link href="E.html" title="Annex E (informative) Additions and Changes in the 5th Edition that Introduce Incompatibilities with the 3rd Edition " rel="next">
</head><body><div class="head">
<h2 id="top">Annotated ECMAScript 5.1 <span id="timestamp"></span></h2>
<div id="mascot-treehouse">
<img id="mascot" align="left" src="js-mascot.svg" alt=""><img id="bubble" src="bubble.svg" alt=""></div>
<p id="slogan">&#8223;Ex igne vita&#8221;</p>
<div id="annotations"></div>
<script src="timestamp.js"></script></div>
<nav>
<a href="C.html">&#8592; Annex C (informative) The Strict Mode of ECMAScript </a> &#8211;
<a href="index.html#contents">TOC</a> &#8211;
<a href="E.html">Annex E (informative) Additions and Changes in the 5th Edition that Introduce Incompatibilities with the 3rd Edition &#8594;</a>
</nav>

<h2 id="D">Annex D (informative) Corrections and Clarifications in the 5th Edition with Possible 3rd Edition Compatibility Impact <a href="#D">#</a> <a href="#D-toc" class="bak">&#9417;</a> <b class="erra">&#9402;</b> <b class="rev1">&#9312;</b> <b class="anno">&#9398;</b></h2>
<p>
Throughout:
In the Edition 3 specification the meaning of phrases such as &#8220;as
if by the expression <code><b>new
Array()</b></code>&#8221; are subject to misinterpretation. In the
Edition 5 specification text for all internal references and
invocations of standard built-in objects and methods has been
clarified by making it explicit that the intent is that the actual
built-in object is to be used rather than the current dynamic value
of the correspondingly named property.
</p>
<p>
<a href="x11.html#x11.8.2">11.8.2</a>,
<a href="x11.html#x11.8.3">11.8.3</a>, <a href="x11.html#x11.8.5">11.8.5</a>: ECMAScript generally uses a left to right evaluation
order, however the Edition 3 specification language for the &gt; and
&lt;= operators resulted in a partial right to left order. The
specification has been corrected for these operators such that it
now specifies a full left to right evaluation order. However, this
change of order is potentially observable if side-effects occur
during the evaluation process.</p>
<p>
<a href="x11.html#x11.1.4">11.1.4</a>:
Edition 5 clarifies the fact that a trailing comma at the end of an
<i>ArrayInitialiser</i>
does not add to the length of the array. This is not a semantic
change from Edition 3 but some implementations may have previously
misinterpreted this.</p>
<p>
<a href="x11.html#x11.2.3">11.2.3</a>:
Edition 5 reverses the order of steps 2 and 3 of the algorithm. The
original order as specified in Editions 1 through 3 was incorrectly
specified such that side-effects of evaluating <i>Arguments</i>
could affect the result of evaluating <i>MemberExpression</i>.</p>
<p>
<a href="x12.html#x12.4">12.4</a>:
In Edition 3, an object is created, as if by <code><b>new
Object()</b></code>to serve as the scope for resolving the name of
the exception parameter passed to a <code><b>catch</b></code>
clause of a <code><b>try</b></code>
statement. If the actual exception object is a function and it is
called from within the <code><b>catch</b></code>
clause, the scope object will be passed as the <b>this</b> value of
the call. The body of the function can then define new properties on
its <b>this</b> value and those property names become visible
identifiers bindings within the scope of the <b>catch</b> clause
after the function returns. In Edition 5, when an exception
parameter is called as a function, <b>undefined</b> is passed as the
<b>this</b> value.</p>
<p>
<a href="x14.html#x14">13</a>:.
In Edition 3, the algorithm for the production <i>FunctionExpression</i>
with an <i>Identifier</i>
adds an object created as if by <code><b>new
Object()</b></code> to the scope chain to serve as a scope for
looking up the name of the function. The identifier resolution rules
(10.1.4 in Edition 3) when applied to such an object will, if
necessary, follow the object&#8217;s prototype chain when attempting to
resolve an identifier. This means all the properties of
Object.prototype are visible as identifiers within that scope. In
practice most implementations of Edition 3 have not implemented this
semantics. Edition 5 changes the specified semantics by using a
Declarative <a href="x10.html#x10.2.1">Environment Record</a> to bind the name of the function.</p>
<p>
<a href="x14.html#x14">14</a>:.
In Edition 3, the algorithm for the production <i>SourceElements </i><b>:</b> <i>SourceElements
SourceElement </i>did not correctly propagate statement
result values in the same manner as <i>Block</i>.
This could result in the <code><b><a href="x15.html#x15.1.2.1">eval</a></b></code> function producing an incorrect result when evaluating a <i><a href="x14.html#x14">Program</a></i>
text. In practice most implementations of Edition 3 have implemented
the correct propagation rather than what was specified in Edition 3.</p>
<p>
<a href="x15.html#x15.10.6">15.10.6</a>:
RegExp.prototype is now a RegExp object rather than an instance of
Object. The value of its [[Class]] internal property which is
observable using <a href="x15.html#x15.2.4.2">Object.prototype.toString</a>
is now &#8220;RegExp&#8221; rather than &#8220;Object&#8221;.</p>
</body><script src="anno.js"></script></html>
Loading

0 comments on commit 0d6451e

Please sign in to comment.