Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

es.object.define-setter.js 737B

1234567891011121314151617
  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 aCallable = require('../internals/a-callable');
  6. var toObject = require('../internals/to-object');
  7. var definePropertyModule = require('../internals/object-define-property');
  8. // `Object.prototype.__defineSetter__` method
  9. // https://tc39.es/ecma262/#sec-object.prototype.__defineSetter__
  10. if (DESCRIPTORS) {
  11. $({ target: 'Object', proto: true, forced: FORCED }, {
  12. __defineSetter__: function __defineSetter__(P, setter) {
  13. definePropertyModule.f(toObject(this), P, { set: aCallable(setter), enumerable: true, configurable: true });
  14. }
  15. });
  16. }