{"action":"created","comment":{"url":"https://api.github.com/repos/alexgibson/notify.js/pulls/comments/59832531","id":59832531,"diff_hunk":"@@ -71,6 +83,11 @@ Notify.isSupported = function(perm) {\n         throw new Error('You must only call this before calling Notification.requestPermission(), otherwise this feature detect would trigger an actual notification!');\n     }\n \n+    if (Notify.serviceWorkerSupported()) {","path":"src/notify.js","position":46,"original_position":46,"commit_id":"f774c1652b68549cd5e3b969f05fec5f207f7f17","original_commit_id":"e584fede1fed56de5e2d8e01acca49301f0dde4d","user":{"login":"alexgibson","id":400117,"avatar_url":"https://avatars.githubusercontent.com/u/400117?v=3","gravatar_id":"","url":"https://api.github.com/users/alexgibson","html_url":"https://github.com/alexgibson","followers_url":"https://api.github.com/users/alexgibson/followers","following_url":"https://api.github.com/users/alexgibson/following{/other_user}","gists_url":"https://api.github.com/users/alexgibson/gists{/gist_id}","starred_url":"https://api.github.com/users/alexgibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexgibson/subscriptions","organizations_url":"https://api.github.com/users/alexgibson/orgs","repos_url":"https://api.github.com/users/alexgibson/repos","events_url":"https://api.github.com/users/alexgibson/events{/privacy}","received_events_url":"https://api.github.com/users/alexgibson/received_events","type":"User","site_admin":false},"body":"I think you're confusing things. Safari won't work, no need to test. It does not support SW yet end of story. Reading the code, I think Chrome Android will break if you use a regular web notification (not via SW).","created_at":"2016-04-15T06:42:54Z","updated_at":"2016-04-15T06:42:54Z","html_url":"https://github.com/alexgibson/notify.js/pull/61#discussion_r59832531","pull_request_url":"https://api.github.com/repos/alexgibson/notify.js/pulls/61","_links":{"self":{"href":"https://api.github.com/repos/alexgibson/notify.js/pulls/comments/59832531"},"html":{"href":"https://github.com/alexgibson/notify.js/pull/61#discussion_r59832531"},"pull_request":{"href":"https://api.github.com/repos/alexgibson/notify.js/pulls/61"}}},"pull_request":{"url":"https://api.github.com/repos/alexgibson/notify.js/pulls/61","id":66495760,"html_url":"https://github.com/alexgibson/notify.js/pull/61","diff_url":"https://github.com/alexgibson/notify.js/pull/61.diff","patch_url":"https://github.com/alexgibson/notify.js/pull/61.patch","issue_url":"https://api.github.com/repos/alexgibson/notify.js/issues/61","number":61,"state":"open","locked":false,"title":"Initial service worker api support","user":{"login":"perrin4869","id":5774716,"avatar_url":"https://avatars.githubusercontent.com/u/5774716?v=3","gravatar_id":"","url":"https://api.github.com/users/perrin4869","html_url":"https://github.com/perrin4869","followers_url":"https://api.github.com/users/perrin4869/followers","following_url":"https://api.github.com/users/perrin4869/following{/other_user}","gists_url":"https://api.github.com/users/perrin4869/gists{/gist_id}","starred_url":"https://api.github.com/users/perrin4869/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perrin4869/subscriptions","organizations_url":"https://api.github.com/users/perrin4869/orgs","repos_url":"https://api.github.com/users/perrin4869/repos","events_url":"https://api.github.com/users/perrin4869/events{/privacy}","received_events_url":"https://api.github.com/users/perrin4869/received_events","type":"User","site_admin":false},"body":"Still quite a way to go, but the basics are here.\r\n\r\nThings working:\r\n\r\n* New extra options in `Notify.js` for Service Worker API\r\n* Notify.js works in service workers too if permission was granted\r\n\r\nTODO:\r\n\r\n* Testing (suggestions would be very much appreciated)\r\n* Update `README.md`\r\n* Event handling. Apparently `show` and `close` are being deprecated, different behavior on service workers, need more investigation.\r\n* Maybe we'll think of something else","created_at":"2016-04-14T14:40:20Z","updated_at":"2016-04-15T06:42:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36ee8e5808d5968ff6ec8915ef5822d4d2443e83","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alexgibson/notify.js/pulls/61/commits","review_comments_url":"https://api.github.com/repos/alexgibson/notify.js/pulls/61/comments","review_comment_url":"https://api.github.com/repos/alexgibson/notify.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alexgibson/notify.js/issues/61/comments","statuses_url":"https://api.github.com/repos/alexgibson/notify.js/statuses/f774c1652b68549cd5e3b969f05fec5f207f7f17","head":{"label":"perrin4869:service_worker","ref":"service_worker","sha":"f774c1652b68549cd5e3b969f05fec5f207f7f17","user":{"login":"perrin4869","id":5774716,"avatar_url":"https://avatars.githubusercontent.com/u/5774716?v=3","gravatar_id":"","url":"https://api.github.com/users/perrin4869","html_url":"https://github.com/perrin4869","followers_url":"https://api.github.com/users/perrin4869/followers","following_url":"https://api.github.com/users/perrin4869/following{/other_user}","gists_url":"https://api.github.com/users/perrin4869/gists{/gist_id}","starred_url":"https://api.github.com/users/perrin4869/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perrin4869/subscriptions","organizations_url":"https://api.github.com/users/perrin4869/orgs","repos_url":"https://api.github.com/users/perrin4869/repos","events_url":"https://api.github.com/users/perrin4869/events{/privacy}","received_events_url":"https://api.github.com/users/perrin4869/received_events","type":"User","site_admin":false},"repo":{"id":55509349,"name":"notify.js","full_name":"perrin4869/notify.js","owner":{"login":"perrin4869","id":5774716,"avatar_url":"https://avatars.githubusercontent.com/u/5774716?v=3","gravatar_id":"","url":"https://api.github.com/users/perrin4869","html_url":"https://github.com/perrin4869","followers_url":"https://api.github.com/users/perrin4869/followers","following_url":"https://api.github.com/users/perrin4869/following{/other_user}","gists_url":"https://api.github.com/users/perrin4869/gists{/gist_id}","starred_url":"https://api.github.com/users/perrin4869/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perrin4869/subscriptions","organizations_url":"https://api.github.com/users/perrin4869/orgs","repos_url":"https://api.github.com/users/perrin4869/repos","events_url":"https://api.github.com/users/perrin4869/events{/privacy}","received_events_url":"https://api.github.com/users/perrin4869/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/perrin4869/notify.js","description":"A handy wrapper for the Web Notifications API","fork":true,"url":"https://api.github.com/repos/perrin4869/notify.js","forks_url":"https://api.github.com/repos/perrin4869/notify.js/forks","keys_url":"https://api.github.com/repos/perrin4869/notify.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/perrin4869/notify.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/perrin4869/notify.js/teams","hooks_url":"https://api.github.com/repos/perrin4869/notify.js/hooks","issue_events_url":"https://api.github.com/repos/perrin4869/notify.js/issues/events{/number}","events_url":"https://api.github.com/repos/perrin4869/notify.js/events","assignees_url":"https://api.github.com/repos/perrin4869/notify.js/assignees{/user}","branches_url":"https://api.github.com/repos/perrin4869/notify.js/branches{/branch}","tags_url":"https://api.github.com/repos/perrin4869/notify.js/tags","blobs_url":"https://api.github.com/repos/perrin4869/notify.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/perrin4869/notify.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/perrin4869/notify.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/perrin4869/notify.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/perrin4869/notify.js/statuses/{sha}","languages_url":"https://api.github.com/repos/perrin4869/notify.js/languages","stargazers_url":"https://api.github.com/repos/perrin4869/notify.js/stargazers","contributors_url":"https://api.github.com/repos/perrin4869/notify.js/contributors","subscribers_url":"https://api.github.com/repos/perrin4869/notify.js/subscribers","subscription_url":"https://api.github.com/repos/perrin4869/notify.js/subscription","commits_url":"https://api.github.com/repos/perrin4869/notify.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/perrin4869/notify.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/perrin4869/notify.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/perrin4869/notify.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/perrin4869/notify.js/contents/{+path}","compare_url":"https://api.github.com/repos/perrin4869/notify.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/perrin4869/notify.js/merges","archive_url":"https://api.github.com/repos/perrin4869/notify.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/perrin4869/notify.js/downloads","issues_url":"https://api.github.com/repos/perrin4869/notify.js/issues{/number}","pulls_url":"https://api.github.com/repos/perrin4869/notify.js/pulls{/number}","milestones_url":"https://api.github.com/repos/perrin4869/notify.js/milestones{/number}","notifications_url":"https://api.github.com/repos/perrin4869/notify.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/perrin4869/notify.js/labels{/name}","releases_url":"https://api.github.com/repos/perrin4869/notify.js/releases{/id}","deployments_url":"https://api.github.com/repos/perrin4869/notify.js/deployments","created_at":"2016-04-05T13:17:48Z","updated_at":"2016-04-05T13:17:49Z","pushed_at":"2016-04-14T16:08:50Z","git_url":"git://github.com/perrin4869/notify.js.git","ssh_url":"git@github.com:perrin4869/notify.js.git","clone_url":"https://github.com/perrin4869/notify.js.git","svn_url":"https://github.com/perrin4869/notify.js","homepage":"https://alexgibson.github.io/notify.js/","size":157,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"alexgibson:master","ref":"master","sha":"32cbcd760b45226a3a2a672c731dd288839f0a3b","user":{"login":"alexgibson","id":400117,"avatar_url":"https://avatars.githubusercontent.com/u/400117?v=3","gravatar_id":"","url":"https://api.github.com/users/alexgibson","html_url":"https://github.com/alexgibson","followers_url":"https://api.github.com/users/alexgibson/followers","following_url":"https://api.github.com/users/alexgibson/following{/other_user}","gists_url":"https://api.github.com/users/alexgibson/gists{/gist_id}","starred_url":"https://api.github.com/users/alexgibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexgibson/subscriptions","organizations_url":"https://api.github.com/users/alexgibson/orgs","repos_url":"https://api.github.com/users/alexgibson/repos","events_url":"https://api.github.com/users/alexgibson/events{/privacy}","received_events_url":"https://api.github.com/users/alexgibson/received_events","type":"User","site_admin":false},"repo":{"id":8220686,"name":"notify.js","full_name":"alexgibson/notify.js","owner":{"login":"alexgibson","id":400117,"avatar_url":"https://avatars.githubusercontent.com/u/400117?v=3","gravatar_id":"","url":"https://api.github.com/users/alexgibson","html_url":"https://github.com/alexgibson","followers_url":"https://api.github.com/users/alexgibson/followers","following_url":"https://api.github.com/users/alexgibson/following{/other_user}","gists_url":"https://api.github.com/users/alexgibson/gists{/gist_id}","starred_url":"https://api.github.com/users/alexgibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexgibson/subscriptions","organizations_url":"https://api.github.com/users/alexgibson/orgs","repos_url":"https://api.github.com/users/alexgibson/repos","events_url":"https://api.github.com/users/alexgibson/events{/privacy}","received_events_url":"https://api.github.com/users/alexgibson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexgibson/notify.js","description":"A handy wrapper for the Web Notifications API","fork":false,"url":"https://api.github.com/repos/alexgibson/notify.js","forks_url":"https://api.github.com/repos/alexgibson/notify.js/forks","keys_url":"https://api.github.com/repos/alexgibson/notify.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexgibson/notify.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexgibson/notify.js/teams","hooks_url":"https://api.github.com/repos/alexgibson/notify.js/hooks","issue_events_url":"https://api.github.com/repos/alexgibson/notify.js/issues/events{/number}","events_url":"https://api.github.com/repos/alexgibson/notify.js/events","assignees_url":"https://api.github.com/repos/alexgibson/notify.js/assignees{/user}","branches_url":"https://api.github.com/repos/alexgibson/notify.js/branches{/branch}","tags_url":"https://api.github.com/repos/alexgibson/notify.js/tags","blobs_url":"https://api.github.com/repos/alexgibson/notify.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexgibson/notify.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexgibson/notify.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexgibson/notify.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexgibson/notify.js/statuses/{sha}","languages_url":"https://api.github.com/repos/alexgibson/notify.js/languages","stargazers_url":"https://api.github.com/repos/alexgibson/notify.js/stargazers","contributors_url":"https://api.github.com/repos/alexgibson/notify.js/contributors","subscribers_url":"https://api.github.com/repos/alexgibson/notify.js/subscribers","subscription_url":"https://api.github.com/repos/alexgibson/notify.js/subscription","commits_url":"https://api.github.com/repos/alexgibson/notify.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexgibson/notify.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexgibson/notify.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexgibson/notify.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexgibson/notify.js/contents/{+path}","compare_url":"https://api.github.com/repos/alexgibson/notify.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexgibson/notify.js/merges","archive_url":"https://api.github.com/repos/alexgibson/notify.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexgibson/notify.js/downloads","issues_url":"https://api.github.com/repos/alexgibson/notify.js/issues{/number}","pulls_url":"https://api.github.com/repos/alexgibson/notify.js/pulls{/number}","milestones_url":"https://api.github.com/repos/alexgibson/notify.js/milestones{/number}","notifications_url":"https://api.github.com/repos/alexgibson/notify.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexgibson/notify.js/labels{/name}","releases_url":"https://api.github.com/repos/alexgibson/notify.js/releases{/id}","deployments_url":"https://api.github.com/repos/alexgibson/notify.js/deployments","created_at":"2013-02-15T15:28:18Z","updated_at":"2016-04-14T16:53:22Z","pushed_at":"2016-04-14T16:08:52Z","git_url":"git://github.com/alexgibson/notify.js.git","ssh_url":"git@github.com:alexgibson/notify.js.git","clone_url":"https://github.com/alexgibson/notify.js.git","svn_url":"https://github.com/alexgibson/notify.js","homepage":"https://alexgibson.github.io/notify.js/","size":186,"stargazers_count":684,"watchers_count":684,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":75,"mirror_url":null,"open_issues_count":4,"forks":75,"open_issues":4,"watchers":684,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alexgibson/notify.js/pulls/61"},"html":{"href":"https://github.com/alexgibson/notify.js/pull/61"},"issue":{"href":"https://api.github.com/repos/alexgibson/notify.js/issues/61"},"comments":{"href":"https://api.github.com/repos/alexgibson/notify.js/issues/61/comments"},"review_comments":{"href":"https://api.github.com/repos/alexgibson/notify.js/pulls/61/comments"},"review_comment":{"href":"https://api.github.com/repos/alexgibson/notify.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alexgibson/notify.js/pulls/61/commits"},"statuses":{"href":"https://api.github.com/repos/alexgibson/notify.js/statuses/f774c1652b68549cd5e3b969f05fec5f207f7f17"}}}}