Take a copy of my old samurai sword
It's 6 years old, used during the Great Browser War to catch
method/properties glitches in NN/IE.
But it's rather simple to adjust it for all your needs - except the
class name, here you need to use myObject.prototype check.
<html>
<head>
<title>props</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<script>
function testObject() {
//var obj = null;
//var obj = Boolean(true); // a primitive value wrapper
var obj = window // an object
//var obj = testObject; // a function pointer
var out = document.forms[0].out; out.value = '';
var who = (obj != null)? typeof(obj) : 'null';
switch(who) {
case 'object':
var arr = new Array();
var prp = null;
for (prp in obj) {arr.push(''+prp+' = '+obj[prp]);}
arr.sort();
for (i=0;i<arr.length;i++) {out.value+=arr
+'\n';}
break;
case 'function':
out.value = obj.arguments.callee;
break;
case 'undefined':
out.value = 'undefined';
break;
case 'null':
out.value = 'null';
break;
default:
out.value = who.toUpperCase()+ ' ' + obj.toString();
}
}
</script>
</head>
<body bgcolor="#FFFFFF">
<form>
<input type="button" value="Explore" onclick="testObject()">
<br>
<textarea name="out" cols="64" rows="32"></textarea>
</form>
</body>
</html>