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: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 17 Nov 2014 16:03:47 +0100
Message-ID: <CADnb78hhg3mhh+K0GGH+O_K+erC2acOkMMhvutyTB-remkK3Yw@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Allen Wirfs-Brock <allen@wirfs-brock.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>, Ian Hickson <ian@hixie.ch>
On Mon, Nov 17, 2014 at 3:41 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> So let's try this specific example of Node and .childNodes.  It seems to me
> that the process of creation here should go something like this:
>
> 1)  Go to create a Node.
> 2)  Discover that it wants to be in a particular Realm, make that Realm
>     current.
> 3)  Create the Node.  This triggers creation of the .childNodes
>     NodeList somehow.  It's very important that this creation happen
>     here, while our desired Realm is current.
> 4)  Restore the old current Realm.
>
> Does that seem sane?

Yes. It seems like Realm might be the only real variable for creation.
Do we know of cases where we want a different Realm?

I think finding an object's associated objects that need to be created
should be done through IDL syntax. I think describing the internal
slots would make a lot of sense for that, though if we just want to
solve the associated object problem we could come up with something
simpler. (I have a hunch that having internal slots more formally
defined will help us in other ways too down the line, but nothing
really concrete so far.)

So IDL's part of creation would be creating the desired object in the
given/implied Realm and creating that object's associated objects in
the same Realm.


-- 
https://annevankesteren.nl/
Received on Monday, 17 November 2014 15:04:18 UTC

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