Re: [w3c/ServiceWorker] Consider providing `navigation` event (#1028)

I'm very interested in this (coming from w3c/manifest#597). I agree with Jake about the semantics: that it should have an (unspecified, user-agent-defined) condition on whether it fires or not, with the intention being that if the user has clearly signalled their intention to open a browser tab, then it does not fire and the app has no opportunity to intercept. But that it would fire for normal link clicks and the like.

I would vaguely suggest the following events would trigger / not trigger the event:

- Left-click a regular link: Yes.
- Middle-click a link or right-click -> open in new tab/window: No.
- Left-click a target=_blank link: Unsure.
- Open an OS shortcut to a URL: Yes.
- Type URL into address bar: No.
- Subframe navigation (e.g., in an iframe): No.

This is just a suggestion and would be UA-defined behaviour, but the idea would be to capture "plain" navigations but not navigations that are directly intended to be shown inside a browser tab.

As for the name, I am fine with "launch" but I agree there's something a bit funny about it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1028#issuecomment-324539206

Received on Thursday, 24 August 2017 05:46:56 UTC