Object.assign and __proto__ property

teramako teramako at gmail.com
Sat Oct 19 07:25:39 PDT 2013


I believe Object.assign never update the target's [[prototype]]. But current rev19 spec is using Put. So I'm afraid of following case will update the [[prototype]].

var soruce = {};
Object.defineProperty(source, "__proto__", {
    value: { a: "A", b: "B" },
    enumerable: true
var target = {};
Object.assign(target, source);
Is this expected result ? and is there a plan to change to DefinePropertyOrThrow from Put ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131019/5fe18f13/attachment.html>

More information about the es-discuss mailing list