[whatwg] Notifications: usage feedback
jonas at sicking.cc
Tue Nov 19 16:45:18 PST 2013
On Tue, Nov 19, 2013 at 5:37 AM, Anne van Kesteren <annevk at 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
>> 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
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
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?"
More information about the whatwg