Created
August 12, 2010 13:56
-
-
Save bga/521000 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onunload = function() | |
{ | |
var _check = function(lbl) | |
{ | |
var a; | |
if(window.document && document.body) | |
a = 'body'; | |
else if(window.document && document.documentElement) | |
a = 'documentElement'; | |
else if(window.document) | |
a = 'document'; | |
else | |
a = 'none'; | |
(alert)('' + lbl + ' ' + a); | |
}; | |
var time = 0; | |
var _checkThread = function() | |
{ | |
_check(time); | |
setTimeout(_checkThread, 0); | |
time += 1; | |
}; | |
_check('now'); | |
_checkThread(); | |
}; | |
if(window.opera) | |
{ | |
history.navigationMode = 'compatible'; | |
location = 'http://google.com/'; | |
} | |
/* | |
chrome v5 | |
now body | |
0 body | |
ie7 | |
now body | |
0 body | |
ff3.6 | |
now body | |
0 body | |
opera | |
now body | |
0 body | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment