How can we do JavaScript object detection for pageShow and pageHide handlers?
if( /* pagehide is supported */ ){ window.addEventListener(\'pagehide\', exitFun
if ('onpagehide' in window) { //if(window.onpagehide || window.onpagehide === null){ window.addEventListener('pagehide', exitFunction, false); } else { window.addEventListener('unload', exitFunction, false); }