I would like to define custom getter and setter for `__proto__` property:

var obj = Object.defineProperty({}, '__proto__', {
    get : function () {return '__proto__ getter'},
    set : function (){return '__proto__ setter'}
});


console.log(obj.__proto__); //[object Object]
console.log(obj.__proto__ = {}); //[object Object]


I didn't find an engine which outputs the values in get and set. The idea
behind my code is to reject the `__proto__` ability to change the internal
[[Prototype]].

Is the above behavior should be observed according ECMAScript 6?

Thank you.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to