W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

Re: Object sharing across globals

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 19 Jul 2013 12:27:53 -0500
Message-ID: <CAAWBYDADZ0cAwY2xrCVOM_Yxh8iDUjRee_jS41Rh-kMqUzk8LA@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
On Thu, Jul 18, 2013 at 6:30 PM, Anne van Kesteren <annevk@annevk.nl> wrote:
> In DOM we already have a problem with [[Prototype]] when a Node moves
> to a different global:
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=20567 (Solutions
> welcome in the bug or separate thread.)
>
> I'm wondering what the right solution is for notifications. Say we
> have two same-origin globals that can reach other (A & B). Now each of
> these creates a Notification object (AN & BN). Now we create a new
> method that returns the notifications associated with a given origin.
>
> If we invoke this method in A, what's the expected result? AN & BN
> (object equality)? AN & BN' (new object for the one from B)? AN' & BN'
> (new objects for everyone).
>
> Now repeat this question for A & B as same-origin, but they cannot
> reach other (synchronously, anyway).
>
> The objects have a close() method to make the notification disappear
> at which point an event will fire on the objects.
>
> See http://notifications.spec.whatwg.org/ for context.

Closely related, I think, is an issue that *just* came up in Web
Components, about the effects of adoptNode on a custom element.
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=20488>

It would be nice to come up with consistent answers here, or at least
have good reasons for being inconsistent.

~TJ
Received on Friday, 19 July 2013 17:28:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:50 UTC