Skip to content

Commit

Permalink
Normative: Add undefined-like exotic objects (aka document.all)
Browse files Browse the repository at this point in the history
  • Loading branch information
bterlson committed Aug 17, 2016
1 parent fbdd724 commit 2d55bef
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -3176,7 +3176,7 @@ <h1>ToBoolean ( _argument_ )</h1>
Object
</td>
<td>
Return *true*.
Return *false* if _argument_ is an undefined-like exotic object; otherwise return *true*.
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -4074,6 +4074,8 @@ <h1>Abstract Equality Comparison</h1>
1. Return the result of performing Strict Equality Comparison _x_ === _y_.
1. If _x_ is *null* and _y_ is *undefined*, return *true*.
1. If _x_ is *undefined* and _y_ is *null*, return *true*.
1. If _x_ is an undefined-like exotic object and _y_ *null*, *undefined*, or an undefined-like exotic object, return *true*.
1. If _x_ is *null* or *undefined* and _y_ is an undefined-like exotic object, return *true*.
1. If Type(_x_) is Number and Type(_y_) is String, return the result of the comparison _x_ == ToNumber(_y_).
1. If Type(_x_) is String and Type(_y_) is Number, return the result of the comparison ToNumber(_x_) == _y_.
1. If Type(_x_) is Boolean, return the result of the comparison ToNumber(_x_) == _y_.
Expand Down Expand Up @@ -8159,6 +8161,14 @@ <h1>[[SetPrototypeOf]] (_V_)</h1>
</emu-alg>
</emu-clause>
</emu-clause>

<emu-clause id="sec-undefined-like-exotic-objects">
<h1>Undefined-like Exotic Objects</h1>
<p>An <dfn>undefined-like exotic object</dfn> is an exotic object that behaves like undefined in the <emu-xref href="#sec-toboolean">ToBoolean</emu-xref> and <emu-xref href="#sec-abstract-equality-comparison">Abstract Equality Comparison</emu-xref> abstract operations and when used as an operand for the <emu-xref href="#sec-typeof-operator">typeof operator</emu-xref>. Undefined-like exotic objects have all the ordinary object internal methods and slots.</p>
<emu-note>
<p>Undefined-like exotic objects are never created by this specification. However, the <a href="https://html.spec.whatwg.org/multipage/obsolete.html#dom-document-all">document.all object</a> in web browsers is a host-created undefined-like exotic object that exists for web compatibility purposes. There are no other known examples of this type of object.</p>
</emu-note>
</emu-clause>
</emu-clause>

<!-- es6num="9.5" -->
Expand Down Expand Up @@ -12472,6 +12482,14 @@ <h1>Runtime Semantics: Evaluation</h1>
Implementation-defined. Must not be `"undefined"`, `"boolean"`, `"function"`, `"number"`, `"symbol"`, or `"string"`.
</td>
</tr>
<tr>
<td>
Object (undefined-like exotic object)
</td>
<td>
`"undefined"`
</td>
</tr>
</tbody>
</table>
</emu-table>
Expand Down

0 comments on commit 2d55bef

Please sign in to comment.