Permalink
Browse files

Catch unload; attempt to stop Pusher error.

  • Loading branch information...
MarkDBlackwell committed Jul 26, 2012
1 parent 64a466b commit 43c97856d994458cc53b9dddf1781b39ae24d30c
Showing with 5 additions and 0 deletions.
  1. +5 −0 app/views/layouts/application.html.erb
@@ -125,6 +125,11 @@ window.onload = function() {
//requestAjaxUpdate();
};
+window.onunload = function() {
+ //alert('got to unload');
+ pusher.disconnect(); //Yet still get error in javascript error console.
+};
+
//-->
</script> </head> <body>

0 comments on commit 43c9785

Please sign in to comment.