Skip to content
Snippets Groups Projects
Commit 26d9c7ff authored by Sean McArthur's avatar Sean McArthur
Browse files

catch winchan removeListener error in IE8

removeListener throws in IE8
parent 474ef633
No related branches found
No related tags found
No related merge requests found
...@@ -236,7 +236,10 @@ ...@@ -236,7 +236,10 @@
// if window is unloaded and the client hasn't called cb, it's an error // if window is unloaded and the client hasn't called cb, it's an error
var onUnload = function() { var onUnload = function() {
removeListener(isIE ? msgTarget : window, 'message', onDie); try {
// IE8 doesn't like this...
removeListener(isIE ? msgTarget : window, 'message', onDie);
} catch (ohWell) { }
if (cb) doPost({ a: 'error', d: 'client closed window' }); if (cb) doPost({ a: 'error', d: 'client closed window' });
cb = undefined; cb = undefined;
// explicitly close the window, in case the client is trying to reload or nav // explicitly close the window, in case the client is trying to reload or nav
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment