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 ?