findAllSubs = function(base) { var baseProto = base.prototype, ans = [] for (f in window) { if (f==String) alert("String!") var proto = f.prototype if (!baseProto.isPrototypeOf(proto)) continue ans.push(proto) } return ans } xs = [] for (f in window) xs.add(f) xs findAllSubs(Object) Object.prototype.isPrototypeOf(String.prototype) true Object.prototype.__defineGetter__ Object.prototype.__lookupGetter__ Object.prototype.__defineSetter__ Object.prototype.__lookupSetter__ // not supported in Safari Object.prototype.watch obj = {} obj.__defineGetter__("p", function() { return 5 }) obj.__defineSetter__("p", function(v) { alert("cannot assign into p!") }) obj.__lookupGetter__("p") obj.__lookupSetter__("p") // only works in Firefox obj.__noSuchMethod__ = function(sel, args) { alert("dnu: " + sel + " " + args) return 1234 } obj.foo(1, 2, 3) // not supported in Safari obj.watch("q", function() { return 1234 })