- From: Boris Zbarsky <bzbarsky@mit.edu>
- Date: Fri, 14 Nov 2014 12:33:30 -0500
- To: Allen Wirfs-Brock <allen@wirfs-brock.com>, Anne van Kesteren <annevk@annevk.nl>
- CC: Domenic Denicola <d@domenic.me>, "public-script-coord@w3.org" <public-script-coord@w3.org>
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. -Boris
Received on Friday, 14 November 2014 17:34:00 UTC