Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
737 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
3 | var DESCRIPTORS = require('../internals/descriptors');
|
---|
4 | var FORCED = require('../internals/object-prototype-accessors-forced');
|
---|
5 | var toObject = require('../internals/to-object');
|
---|
6 | var aFunction = require('../internals/a-function');
|
---|
7 | var definePropertyModule = require('../internals/object-define-property');
|
---|
8 |
|
---|
9 | // `Object.prototype.__defineSetter__` method
|
---|
10 | // https://tc39.es/ecma262/#sec-object.prototype.__defineSetter__
|
---|
11 | if (DESCRIPTORS) {
|
---|
12 | $({ target: 'Object', proto: true, forced: FORCED }, {
|
---|
13 | __defineSetter__: function __defineSetter__(P, setter) {
|
---|
14 | definePropertyModule.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });
|
---|
15 | }
|
---|
16 | });
|
---|
17 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.