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

Commit

Permalink
Normative Optional: Add WeakRef.prototype.constructor
Browse files Browse the repository at this point in the history
Fixes #131
  • Loading branch information
littledan committed Jun 4, 2019
1 parent 5c8c1bc commit 1465c3c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@
copyright: proposal
contributors: Dean Tribble, Till Schneidereit, Sathya Gunasekaran
</pre>
<style>
[normative-optional] {
border-left: 5px solid #ff6600;
padding: .5em;
display: block;
background: #ffeedd;
}
[normative-optional]:before {
display: block;
color: #884400;
content: "NORMATIVE OPTIONAL";
}
</style>

<emu-import href="./weak-ref.html"></emu-import>
<emu-import href="./finalization-group.html"></emu-import>
Expand Down
12 changes: 12 additions & 0 deletions spec/weak-ref.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ <h1>Properties of the WeakRef Prototype Object</h1>
<li>does not have a [[Target]] internal slot.</li>
</ul>

<emu-clause id="sec-weak-ref.prototype.constructor" normative-optional>
<h1>WeakRef.prototype.constructor</h1>

<p>The initial value of `WeakRef.prototype.constructor` is the intrinsic object %WeakRef%.</p>

<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>

<emu-note type="editor">
This section is to be treated identically to the "Annex B" of ECMA-262, but to be written in-line with the main specification.
</emu-note>
</emu-clause>

<emu-clause id="sec-weak-ref.prototype.deref">
<h1>WeakRef.prototype.deref ( )</h1>
<p>The following steps are taken:</p>
Expand Down

2 comments on commit 1465c3c

@leobalter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@littledan @gsathya I believe it should be [[Writable]]: *true*, right?

@littledan
Copy link
Member Author

@littledan littledan commented on 1465c3c Jun 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Looks like, these days, most definitions of the constructor property don't include property attributes. We should probably follow that pattern.

Please sign in to comment.