Why is it not possible to define non configurable properties in the global window object?

91 views Asked by At

I get the following error in Firefox 52.0a2 (2017-01-06), when I try to set a non configurable property to the window object.

TypeError: Not allowed to define a non-configurable property on the WindowProxy object

However it's working in the latest Firefox release (50.1.0) without any problems. (btw, it's also working in Opera and Chrome)

Example code:

Object.defineProperty(window, 'test', {
  enumerable: false,
  configurable: false,
  writable: false,
  value: 'value'
});
1

There are 1 answers

0
Robbendebiene On BEST ANSWER

Since Firefox 53 it's working, regardless of the build type. More info: https://bugzilla.mozilla.org/show_bug.cgi?id=1329323