W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2014

RE: Determining what prototype should be used for an object

From: Domenic Denicola <d@domenic.me>
Date: Fri, 14 Nov 2014 11:31:47 +0000
To: Boris Zbarsky <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <0d950465e5ce4ab3931c22bdfa33d666@CY1PR0501MB1369.namprd05.prod.outlook.com>
Very interesting...

From: Boris Zbarsky [mailto:bzbarsky@mit.edu] 

> In ES, the answer typically seems to be "the global of the current Realm".  But in ES it's also not common for built-in functions to create objects and keep returning them, for what it's worth.

> for the most part in browsers today IDL-defined methods that create objects will create the object using the global environment that the "this"  value for the method is associated with.  This is the global environment it initially got its prototype from, except in some cases for nodes when adoptNode is involved.

Just to sharpen the discussion, it would help to give one example of each...

Honestly the WebIDL answer sounds pretty reasonable to me, so I am interested in where ES mismatches.
Received on Friday, 14 November 2014 11:32:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:23 UTC