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 10:29:36 -0500
Message-ID: <546A1460.20405@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, 10:26 AM, Anne van Kesteren wrote:
>> Different from what?
>
>  From whatever the default would be.

That depends on the defauly.

> From my tests it seems all objects can behave the same way.

That being to have the non-ES behavior of using the "this" object to 
determine the Realm, yes?

> I was just wondering if there were some cases
> that we did not touch upon that defy that.

That depends on whether you consider things like:

   frames[0].URL = URL;
   var URL = new frames[0].URL;

to be like your other cases or not.

> Yeah. [[slot]] seems obvious notation-wise. They can be similarly
> declared to attributes I think. Probably with default values.
>
>    boolean [[bubbles]] = false;
>    boolean [[cancelable]] = false;
>
>    DOMImplementation [[implementation]]; // enough to create one and
> make it "associated"

For the case of things like this that have associated attributes, I 
would really prefer it if we could somehow specify it only once instead 
of specifying the slot _and_ the attribute (and risking them diverging).

-Boris
Received on Monday, 17 November 2014 15:30:05 UTC

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