Re: Determining what prototype should be used for an object

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.

Yeah.

> 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 
HTMLCollection.

-Boris

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