W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2015

Re: A new hack for singleton objects

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Wed, 18 Mar 2015 09:29:44 -0400
Message-ID: <55097DC8.8080402@mit.edu>
To: Anne van Kesteren <annevk@annevk.nl>
CC: Domenic Denicola <d@domenic.me>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On 3/18/15 9:21 AM, Anne van Kesteren wrote:
> On Wed, Mar 18, 2015 at 2:11 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>> As currently defined, Notification.requestPermission uses the origin of
>> "wherever script was entered" (entry settings object's origin).  See
>> <https://notifications.spec.whatwg.org/#dom-notification-requestpermission>.
>> I personally consider this sort of action-at-a-distance very broken, but
>> some spec editors seem to think that because UAs do it for some things (e.g.
>> Location) we should do it for everything.  :(
>
> Being the editor, I don't think that's true.

To be clear, I don't think you're one of "some spec editors".

> We lack some clear terminology and principles around globals and origins which is why
> they continue to be a mess. As you know I've filed various bugs on
> both HTML and IDL to get this cleared up, but not much progress to
> date. Given how the Notifications API is not really widely deployed
> yet, I'm sure we can change this. What would you suggest it says?

It'd make the most sense to me personally to use the origin of the 
global of the Realm of the requestPermission function.

Except of course the HTML spec pretends like globals don't have origins, 
which is also singularly unhelpful....

-Boris
Received on Wednesday, 18 March 2015 13:30:17 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 18 March 2015 13:30:18 UTC