Re: [whatwg] Configurability of document.domain

On 11/21/13 6:28 AM, Anne van Kesteren wrote:
> IE10 has configurable set to false too.

IE's behavior here makes no sense.  The property is set 
non-configurable, but it's on the prototype, not on the object itself. 
So this testcase:

   alert(Object.getOwnPropertyDescriptor(Document.prototype, 
"domain").configurable);
   Object.defineProperty(document, "domain", { value: 5 });
   alert(document.domain);

alerts "false" and then "5" in the IE11 preview, for example.

Either the property should be unforgeable (and then live on the document 
object itself and be non-configurable), or it should be on the proto and 
configurable (because it can be shadowed anyway, so no point in 
disallowing configurability).

> So we have Safari/IE10 vs Firefox/Chrome.

The Safari and IE behaviors are quite different here.

As are the Firefox/Chrome behaviors, actually (in Firefox it's a 
configurable accessor on the prototype, but in Chrome it's a 
configurable value property on the object itself)...

4 browsers, 4 different behaviors, yay.  ;)

-Boris

Received on Thursday, 21 November 2013 13:45:55 UTC