{"action":"created","issue":{"url":"https://api.github.com/repos/meetecho/janus-gateway/issues/333","labels_url":"https://api.github.com/repos/meetecho/janus-gateway/issues/333/labels{/name}","comments_url":"https://api.github.com/repos/meetecho/janus-gateway/issues/333/comments","events_url":"https://api.github.com/repos/meetecho/janus-gateway/issues/333/events","html_url":"https://github.com/meetecho/janus-gateway/issues/333","id":107364822,"number":333,"title":"Defer onbeforeunload handling in janus.js","user":{"login":"ndarilek","id":1172,"avatar_url":"https://avatars.githubusercontent.com/u/1172?v=3","gravatar_id":"","url":"https://api.github.com/users/ndarilek","html_url":"https://github.com/ndarilek","followers_url":"https://api.github.com/users/ndarilek/followers","following_url":"https://api.github.com/users/ndarilek/following{/other_user}","gists_url":"https://api.github.com/users/ndarilek/gists{/gist_id}","starred_url":"https://api.github.com/users/ndarilek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndarilek/subscriptions","organizations_url":"https://api.github.com/users/ndarilek/orgs","repos_url":"https://api.github.com/users/ndarilek/repos","events_url":"https://api.github.com/users/ndarilek/events{/privacy}","received_events_url":"https://api.github.com/users/ndarilek/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-20T00:51:29Z","updated_at":"2015-09-21T11:11:06Z","closed_at":"2015-09-21T11:11:06Z","body":"I'm attempting to use the `returnValue` property of the onbeforeunload event to prompt whether the user wants to leave a page when a call is in progress. Unfortunately, while clicking \"Stay on page\" does in fact prevent the user from navigating away, it doesn't prevent the call from dropping as I'd like.\r\n\r\nLooking through the source, I see janus.js has its own onbeforeunload handling. I think this is great for most default cases, but I'd like it if I could opt out of it and call the function myself. Maybe move the functionality into a Janus.destroy() function and let me configure whether it is called automatically on tab close, with the current way being the default?\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/meetecho/janus-gateway/issues/comments/141944020","html_url":"https://github.com/meetecho/janus-gateway/issues/333#issuecomment-141944020","issue_url":"https://api.github.com/repos/meetecho/janus-gateway/issues/333","id":141944020,"user":{"login":"lminiero","id":3684796,"avatar_url":"https://avatars.githubusercontent.com/u/3684796?v=3","gravatar_id":"","url":"https://api.github.com/users/lminiero","html_url":"https://github.com/lminiero","followers_url":"https://api.github.com/users/lminiero/followers","following_url":"https://api.github.com/users/lminiero/following{/other_user}","gists_url":"https://api.github.com/users/lminiero/gists{/gist_id}","starred_url":"https://api.github.com/users/lminiero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lminiero/subscriptions","organizations_url":"https://api.github.com/users/lminiero/orgs","repos_url":"https://api.github.com/users/lminiero/repos","events_url":"https://api.github.com/users/lminiero/events{/privacy}","received_events_url":"https://api.github.com/users/lminiero/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T11:11:06Z","updated_at":"2015-09-21T11:11:06Z","body":"Just committed: https://github.com/meetecho/janus-gateway/commit/6c8c6eeed41eda272f14dfd54fab10bcf5f40e3b\r\nLet me know if that's not working as expected for you."}}