W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2013

Re: [whatwg] Notifications: usage feedback

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 19 Nov 2013 16:45:18 -0800
Message-ID: <CA+c2ei9Mo_rNKFUe+22nr+Nct2-UnCmwjbBnebmk1Jkp5w9Ugw@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: WHATWG <whatwg@lists.whatwg.org>, James Burke <jrburke@gmail.com>
On Tue, Nov 19, 2013 at 5:37 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
>>>> This may be part of just further defining the steps for the "click"
>>>> pathway in the spec, but at least in FirefoxOS right now, the
>>>> notification onclick pathway does not bring the app to the visible
>>>> front in all cases. The email app has to do some extra document.hidden
>>>> checking and try to bring itself to the front.
>>> That seems like a UI detail we cannot really say anything about in the
>>> specification.
>> Again, this seems unlikely to work in practice. I.e. I would expect
>> that authors would expect one behavior (likely the behavior of
>> whatever platform they are developing on) and that things would break
>> when the website is used on platforms that has the other behavior.
>> I suspect allowing the author to choose behavior here is going to work
>> more reliably.
> What are you thinking of? We define some kind of UI hints a developer
> can register for when initiating a new notification? Might work I
> suppose.

I think we should have a defined way for an author to bring forward a
page when the notification is clicked.

This could be either a property on the notification
"openCreatingWindowWhenNotificationIsClickedPlease: true".

Or define that a service worker is notified about a click, and then
enable the service worker to find a particular window (which may or
may not be connected to the service worker) and be able to bring that
window to the foreground.

Or a way for a window to be notified when the notification is clicked
such that it can bring itself forward using window.focus().

Or something else.

The goal is to be able to answer the question "If I'm a web developer
and want to bring forward the window connected to a notification when
the notification is clicked, what code should I write?"

/ Jonas
Received on Wednesday, 20 November 2013 00:46:13 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:14 UTC