Normative optional WeakRef#constructor

This commit is contained in:
Leo Balter 2019-06-07 13:10:31 -04:00 committed by Rick Waldron
parent 16e9389b01
commit 5fabef83dc
1 changed files with 21 additions and 3 deletions

View File

@ -3,11 +3,29 @@
/*---
esid: sec-properties-of-the-weak-ref-prototype-object
description: WeakRef.prototype.constructor is not defined
description: WeakRef.prototype.constructor
info: |
Ref https://github.com/tc39/proposal-weakrefs/issues/55#issuecomment-444534867
WeakRef.prototype.constructor
Normative Optional
The initial value of WeakRef.prototype.constructor is the intrinsic object %WeakRef%.
This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
This section is to be treated identically to the "Annex B" of ECMA-262, but to be written in-line with the main specification.
includes: [propertyHelper.js]
features: [WeakRef]
---*/
var actual = WeakRef.prototype.hasOwnProperty('constructor');
assert.sameValue(actual, false);
// If implemented, it should conform to the spec text
if (actual) {
verifyProperty(WeakRef.prototype, 'constructor', {
value: WeakRef,
writable: false,
enumerable: false,
configurable: true
});
}