{"action":"created","issue":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3847","labels_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3847/labels{/name}","comments_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3847/comments","events_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3847/events","html_url":"https://github.com/pouchdb/pouchdb/issues/3847","id":76834957,"number":3847,"title":"Live Sync + window.location.reload throws unhandled exception","user":{"login":"mrzor","id":54230,"avatar_url":"https://avatars.githubusercontent.com/u/54230?v=3","gravatar_id":"","url":"https://api.github.com/users/mrzor","html_url":"https://github.com/mrzor","followers_url":"https://api.github.com/users/mrzor/followers","following_url":"https://api.github.com/users/mrzor/following{/other_user}","gists_url":"https://api.github.com/users/mrzor/gists{/gist_id}","starred_url":"https://api.github.com/users/mrzor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrzor/subscriptions","organizations_url":"https://api.github.com/users/mrzor/orgs","repos_url":"https://api.github.com/users/mrzor/repos","events_url":"https://api.github.com/users/mrzor/events{/privacy}","received_events_url":"https://api.github.com/users/mrzor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-15T19:42:25Z","updated_at":"2015-05-16T22:52:02Z","closed_at":null,"body":"Title should say it all.\r\n\r\nI gisted a workaround (in coffee) : https://gist.github.com/mrzor/8d0d12be413e873682b8 \r\nAnd there is a jsfiddle that reproduces the error : http://jsfiddle.net/mrzor/51ps6qza/2/\r\n\r\nCatch it with your devtools / pause on exceptions.\r\nNo need to \"pause on caught exception\" as this one appears uncaught despite the fact that `.on('error', ...)` is set."},"comment":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/comments/102709061","html_url":"https://github.com/pouchdb/pouchdb/issues/3847#issuecomment-102709061","issue_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3847","id":102709061,"user":{"login":"mrzor","id":54230,"avatar_url":"https://avatars.githubusercontent.com/u/54230?v=3","gravatar_id":"","url":"https://api.github.com/users/mrzor","html_url":"https://github.com/mrzor","followers_url":"https://api.github.com/users/mrzor/followers","following_url":"https://api.github.com/users/mrzor/following{/other_user}","gists_url":"https://api.github.com/users/mrzor/gists{/gist_id}","starred_url":"https://api.github.com/users/mrzor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrzor/subscriptions","organizations_url":"https://api.github.com/users/mrzor/orgs","repos_url":"https://api.github.com/users/mrzor/repos","events_url":"https://api.github.com/users/mrzor/events{/privacy}","received_events_url":"https://api.github.com/users/mrzor/received_events","type":"User","site_admin":false},"created_at":"2015-05-16T22:52:02Z","updated_at":"2015-05-16T22:52:02Z","body":"I cannot think of any downsides to PouchDB adding the global listener itself.\r\n\r\nI can imagine other issues arising from this. They might also share the \"non impactful\" nature of this one - I believe that this issue is not data-threatening.\r\n\r\nNo further comment on this, the choice is mostly yours. I can submit a documentation PR if you'd rather go the other route. To add the event handler to window, you probably know best how to do that in a sane way."}}