1

So, I wanted to set in one part of the page that document.domain property can't be set, so I used this call:

Object.defineProperty( document, "domain", {
    writable: false,
    enumerable: true,
    configurable: true
});

And later in the page I have the call that just changes writable attribute to true:

Object.defineProperty( document, "domain", {
    writable: true,
    enumerable: true,
    configurable: true
});

However, immediately after setting it to true, my chrome window breaks and I get the blue screen with the message: Aw snap! Something went wrong while displaying the webpage. What's wrong here ?

Zed
  • 5,683
  • 11
  • 49
  • 81
  • http://stackoverflow.com/questions/2600709/changing-document-domain-to-completely-other-domain – Oleksandr T. Nov 14 '14 at 14:14
  • I don't have a problem with the origin, because I didn't even changed document.domain, just having those 2 calls will break the web page – Zed Nov 14 '14 at 14:16
  • Looks like a bug to me, why would you want it anyway? – PiniH Nov 14 '14 at 14:16
  • Hmm, can reproduce here. I'd consider filing a bug with the Chromium project after checking if any other properties also have the same behaviour. Firefox has no issues with this code. – Qantas 94 Heavy Nov 14 '14 at 14:20

0 Answers0