- From: Allen Wirfs-Brock <allen@wirfs-brock.com>
- Date: Fri, 14 Nov 2014 09:39:05 -0800
- To: Boris Zbarsky <bzbarsky@MIT.EDU>
- Cc: Anne van Kesteren <annevk@annevk.nl>, Domenic Denicola <d@domenic.me>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Nov 14, 2014, at 9:33 AM, Boris Zbarsky wrote: > On 11/14/14, 12:00 PM, Allen Wirfs-Brock wrote: >>> var x = new self[0].Array() >>> w(isObjectFromGlobal(x, self[0])) >>> x = Array.prototype.constructor.call(self[0]) >>> w(isObjectFromGlobal(x, self[0])) >> >> according to the ES6 spec. >> new Array() >> and >> Array.prototype.constructor.call(anything) >> both produce objects whose [[Prototype]] are in the same realm as Array. So the answer should yield true, true. > > No, because the quoted code is using two different Array constructors. To per ES spec "true, false" is correct. Ah, right. I wasn't exactly sure what self was, but I was assuming that self[0]j.Array was the same as Array Allen
Received on Friday, 14 November 2014 17:39:36 UTC