Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
change step order to remove legacy hasownproperty behavior (#10)
Browse files Browse the repository at this point in the history
* change step order to remove legacy hasownproperty behavior

* fixup: [spec] `npm run build`

Co-authored-by: jamiebuilds <jamiebuilds@users.noreply.github.com>
  • Loading branch information
jamiebuilds and jamiebuilds committed Apr 21, 2021
1 parent a12c012 commit d74b177
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
7 changes: 2 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@
});
let sdoMap = JSON.parse(`{}`);
let biblio = JSON.parse(`{"refsByClause":{"sec-object.has":["_ref_0","_ref_1","_ref_2","_ref_3","_ref_4","_ref_5"]},"entries":[{"type":"step","id":"step-has-topropertykey","stepNumbers":[1],"referencingIds":["_ref_0","_ref_2"],"key":"step-has-topropertykey"},{"type":"step","id":"step-has-toobject","stepNumbers":[2],"referencingIds":["_ref_1"],"key":"step-has-toobject"},{"type":"clause","id":"sec-object.has","aoid":null,"titleHTML":"Object.has ( <var>object</var>, <var>property</var> )","number":"1","referencingIds":[],"key":"Object.has ( object, property )"},{"type":"clause","id":"sec-copyright-and-software-license","aoid":null,"titleHTML":"Copyright &amp; Software License","number":"A","referencingIds":[],"key":"Copyright & Software License"}]}`);</script><style>body {
let biblio = JSON.parse(`{"refsByClause":{"sec-object.has":["_ref_0","_ref_1","_ref_2"]},"entries":[{"type":"step","id":"step-has-toobject","stepNumbers":[1],"referencingIds":[],"key":"step-has-toobject"},{"type":"step","id":"step-has-topropertykey","stepNumbers":[2],"referencingIds":[],"key":"step-has-topropertykey"},{"type":"clause","id":"sec-object.has","aoid":null,"titleHTML":"Object.has ( <var>object</var>, <var>property</var> )","number":"1","referencingIds":[],"key":"Object.has ( object, property )"},{"type":"clause","id":"sec-copyright-and-software-license","aoid":null,"titleHTML":"Copyright &amp; Software License","number":"A","referencingIds":[],"key":"Copyright & Software License"}]}`);</script><style>body {
display: flex;
font-size: 18px;
line-height: 1.5;
Expand Down Expand Up @@ -2213,10 +2213,7 @@
<emu-clause id="sec-object.has">
<h1><span class="secnum">1</span> Object.has ( <var>object</var>, <var>property</var> )</h1>
<p>When the <code>has</code> method is called, the following steps are taken:</p>
<emu-alg><ol><li id="step-has-topropertykey">Let <var>P</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_3"><a href="https://tc39.es/ecma262/#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>property</var>).</li><li id="step-has-toobject">Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_4"><a href="https://tc39.es/ecma262/#sec-toobject">ToObject</a></emu-xref>(<var>object</var>).</li><li>Return ?&nbsp;<emu-xref aoid="HasOwnProperty" id="_ref_5"><a href="https://tc39.es/ecma262/#sec-hasownproperty">HasOwnProperty</a></emu-xref>(<var>O</var>, <var>P</var>).</li></ol></emu-alg>
<emu-note><span class="note">Note</span><div class="note-contents">
<p>The ordering of steps <emu-xref href="#step-has-topropertykey" id="_ref_0"><a href="#step-has-topropertykey">1</a></emu-xref> and <emu-xref href="#step-has-toobject" id="_ref_1"><a href="#step-has-toobject">2</a></emu-xref> is chosen to ensure that any exception that would have been thrown by step <emu-xref href="#step-has-topropertykey" id="_ref_2"><a href="#step-has-topropertykey">1</a></emu-xref> in previous editions of this specification will continue to be thrown even if the <emu-val>this</emu-val> value is <emu-val>undefined</emu-val> or <emu-val>null</emu-val>.</p>
</div></emu-note>
<emu-alg><ol><li id="step-has-toobject">Let <var>O</var> be ?&nbsp;<emu-xref aoid="ToObject" id="_ref_0"><a href="https://tc39.es/ecma262/#sec-toobject">ToObject</a></emu-xref>(<var>object</var>).</li><li id="step-has-topropertykey">Let <var>P</var> be ?&nbsp;<emu-xref aoid="ToPropertyKey" id="_ref_1"><a href="https://tc39.es/ecma262/#sec-topropertykey">ToPropertyKey</a></emu-xref>(<var>property</var>).</li><li>Return ?&nbsp;<emu-xref aoid="HasOwnProperty" id="_ref_2"><a href="https://tc39.es/ecma262/#sec-hasownproperty">HasOwnProperty</a></emu-xref>(<var>O</var>, <var>P</var>).</li></ol></emu-alg>
</emu-clause><emu-annex id="sec-copyright-and-software-license">
<h1><span class="secnum">A</span> Copyright &amp; Software License</h1>

Expand Down
5 changes: 1 addition & 4 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ contributors: Jamie Kyle
<h1>Object.has ( _object_, _property_ )</h1>
<p>When the `has` method is called, the following steps are taken:</p>
<emu-alg>
1. [id="step-has-topropertykey"] Let _P_ be ? ToPropertyKey(_property_).
1. [id="step-has-toobject"] Let _O_ be ? ToObject(_object_).
1. [id="step-has-topropertykey"] Let _P_ be ? ToPropertyKey(_property_).
1. Return ? HasOwnProperty(_O_, _P_).
</emu-alg>
<emu-note>
<p>The ordering of steps <emu-xref href="#step-has-topropertykey"></emu-xref> and <emu-xref href="#step-has-toobject"></emu-xref> is chosen to ensure that any exception that would have been thrown by step <emu-xref href="#step-has-topropertykey"></emu-xref> in previous editions of this specification will continue to be thrown even if the *this* value is *undefined* or *null*.</p>
</emu-note>
</emu-clause>

0 comments on commit d74b177

Please sign in to comment.