Export (0) Print
Expand All

2.9.4.2 Object.prototype.__defineSetter__(propertyName, functionObject)

When __defineSetter__ is called, the following steps are taken: 

  1. If the type of functionObject is not a function object, raise a TypeError exception

  2. Let D be a newly created Property Descriptor with no fields

  3. Set D.[[Enumerable]] to true

  4. Set D.[[Configurable]] to true

  5. Set D.[[Set]] to functionObject

  6. If this value is undefined or null, let this be the global object

  7. Call [[DefineOwnProperty]] on the this value with the arguments ToString(propertyName), propDesc, and false

Show:
© 2014 Microsoft