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: Boris Zbarsky <bzbarsky@mit.edu>
Date: Mon, 17 Nov 2014 13:37:35 -0500
Message-ID: <546A406F.7090803@mit.edu>
To: Anne van Kesteren <annevk@annevk.nl>
CC: Allen Wirfs-Brock <allen@wirfs-brock.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>, Ian Hickson <ian@hixie.ch>
On 11/17/14, 1:32 PM, Anne van Kesteren wrote:
> On Mon, Nov 17, 2014 at 6:41 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>> On 11/17/14, 12:18 PM, Anne van Kesteren wrote:
>>> 1) We probably want [LegacyNewObject] and [NewObject] to distinguish
>>> those two cases.
>> Hmm... OK.
> Better idea? If we need to distinguish them somehow and we don't want
> to perpetuate the createElement() behavior...

If I had a better idea, I would have said.  ;)

> getElementsByTagName() is tricky since it may throw away its cache as
> well

OK, bad example.  But there are various other methods like that which do 
not throw anything away.

> What we need a hook for is making sure that
> when there's nothing in the map it creates an object with the correct
> Realm.


> I'm not sure that's sensible since for getElementsByTagName() that
> would not match a JavaScript-based implementation either.

It really depends on how the JavaScript-based implementation was done, 
and in particular how it got the factory function for creating the 

Received on Monday, 17 November 2014 18:38:08 UTC

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