Skip to content

Commit

Permalink
Normative: Make non-writable prototype properties not prevent assigni…
Browse files Browse the repository at this point in the history
…ng to instance

TC39 is discussing making inherited non-writable properties overridable with Set,
in tc39#1307. We have not yet assessed the web compatibility of the change or written
tests, so this PR is not yet ready to merge, but this PR gives some concreteness
to how the specification may be done, to help move the discussion forward.

This patch implements the approach described in tc39#1307 (comment)
  • Loading branch information
littledan committed Oct 9, 2018
1 parent 578dd55 commit a38c0b1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -7016,7 +7016,6 @@ <h1>OrdinarySetWithOwnDescriptor ( _O_, _P_, _V_, _Receiver_, _ownDesc_ )</h1>
1. Else,
1. Set _ownDesc_ to the PropertyDescriptor { [[Value]]: *undefined*, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: *true* }.
1. If IsDataDescriptor(_ownDesc_) is *true*, then
1. If _ownDesc_.[[Writable]] is *false*, return *false*.
1. If Type(_Receiver_) is not Object, return *false*.
1. Let _existingDescriptor_ be ? _Receiver_.[[GetOwnProperty]](_P_).
1. If _existingDescriptor_ is not *undefined*, then
Expand Down

0 comments on commit a38c0b1

Please sign in to comment.