<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script type="text/javascript">
function isWindow( obj ) {
/* jshint eqeqeq: false */
return obj != null && obj == obj.window;
};
function test(){
console.log(this);
console.log(this.window);
console.log(isWindow(this));
}
test();
</script>
</body>
</html>