- From: Jonas Sicking <jonas@sicking.cc>
- Date: Fri, 6 Dec 2013 16:03:58 -0800
- To: Jon Lee <jonlee@apple.com>
- Cc: James Burke <jrburke@gmail.com>, public-web-notification <public-web-notification@w3.org>
On Mon, Dec 2, 2013 at 6:17 PM, Jon Lee <jonlee@apple.com> wrote: >> 4) onclick does not bring web app to front >> >> 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. >> >> What I would rather see is by default the web page is brought to the >> visible front, and then perhaps allow the app a way to cancel that >> behavior perhaps via a preventDefault() type of mechanism on any >> notification click event. >> >> This would also reduce the need for an API that the app could call to >> bring itself "to the visible front". Right now, there is an >> app.launch() API in FirefoxOS for this, but there are concerns that >> giving apps the ability to launch themselves to the front could lead >> to an abuse of that API. > > How or even whether a notification platform exposes clicks to the Web Notification API is undefined. FirefoxOS's notification service is free per spec to adopt the behavior requested. I think it's important for a web developer to be able to write code to respond with UI when a user clicks a notification. Simply saying "it's platform dependent" is of little help for a web developer. I.e. we need to be able to tell developers "here is how you should write your code such that when the user clicks the notification your page is brought to front". On platforms where the native notification system doesn't support *any* way of reacting to clicks on the notification we are of course out of luck. On such platforms the implementation is stuck with either never having any way of reacting to clicked notifications, or simply not integrating with native notifications. Are there really such platforms though? / Jonas
Received on Saturday, 7 December 2013 00:04:56 UTC