{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/ServiceWorker/issues/1028","repository_url":"https://api.github.com/repos/w3c/ServiceWorker","labels_url":"https://api.github.com/repos/w3c/ServiceWorker/issues/1028/labels{/name}","comments_url":"https://api.github.com/repos/w3c/ServiceWorker/issues/1028/comments","events_url":"https://api.github.com/repos/w3c/ServiceWorker/issues/1028/events","html_url":"https://github.com/w3c/ServiceWorker/issues/1028","id":195626543,"number":1028,"title":"Consider providing `navigation` event","user":{"login":"delapuente","id":757942,"avatar_url":"https://avatars.githubusercontent.com/u/757942?v=3","gravatar_id":"","url":"https://api.github.com/users/delapuente","html_url":"https://github.com/delapuente","followers_url":"https://api.github.com/users/delapuente/followers","following_url":"https://api.github.com/users/delapuente/following{/other_user}","gists_url":"https://api.github.com/users/delapuente/gists{/gist_id}","starred_url":"https://api.github.com/users/delapuente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delapuente/subscriptions","organizations_url":"https://api.github.com/users/delapuente/orgs","repos_url":"https://api.github.com/users/delapuente/repos","events_url":"https://api.github.com/users/delapuente/events{/privacy}","received_events_url":"https://api.github.com/users/delapuente/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-14T19:43:08Z","updated_at":"2016-12-14T20:00:15Z","closed_at":null,"body":"Despite the use case in [Jake's comment](https://github.com/w3c/ServiceWorker/issues/993#issuecomment-255329512) for issue #993, there is another interesting case in this [manifest issue](https://github.com/w3c/manifest/issues/479) about _singleton_ apps. Perhaps something like:\r\n\r\n```\r\nself.onnavigation = event => {\r\n  const clients = await self.clients.matchAll({ type: 'window' });\r\n  if (clients.length === 1) {\r\n    clients[0].navigate(event.request.url);\r\n    clients[0].focus();\r\n    event.preventDefault();\r\n  }\r\n};\r\n```\r\n\r\nIf the app is a SPA, then SW could use `#` routes or post a message to the client to start an in-site navigation."},"comment":{"url":"https://api.github.com/repos/w3c/ServiceWorker/issues/comments/267139823","html_url":"https://github.com/w3c/ServiceWorker/issues/1028#issuecomment-267139823","issue_url":"https://api.github.com/repos/w3c/ServiceWorker/issues/1028","id":267139823,"user":{"login":"wanderview","id":1256526,"avatar_url":"https://avatars.githubusercontent.com/u/1256526?v=3","gravatar_id":"","url":"https://api.github.com/users/wanderview","html_url":"https://github.com/wanderview","followers_url":"https://api.github.com/users/wanderview/followers","following_url":"https://api.github.com/users/wanderview/following{/other_user}","gists_url":"https://api.github.com/users/wanderview/gists{/gist_id}","starred_url":"https://api.github.com/users/wanderview/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanderview/subscriptions","organizations_url":"https://api.github.com/users/wanderview/orgs","repos_url":"https://api.github.com/users/wanderview/repos","events_url":"https://api.github.com/users/wanderview/events{/privacy}","received_events_url":"https://api.github.com/users/wanderview/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T20:00:15Z","updated_at":"2016-12-14T20:00:15Z","body":"Hmm, ok.  Although I'm not sure I agree if its a good idea."}}
{"actor":{"display_login":"wanderview"}}