| Function Summary | |
className(!Function classConstructor) ⇒ (string|undefined)Returns the name of a type of object. | |
init_()Adds all known constructors to the type registry. | |
registerType_(string name, !Function ctor)Registers a type which will be recognized by goog.debug.reflect.typeOf. | |
typeOf(<Any Type> obj) ⇒ stringGuesses the real type of the object, even if its {@code toString} method is overridden. Gives exact result for all goog.provided classes in non-compiled code, and some often used native classes in compiled code too. Not tested in multi-frame environment. Example use case to get better type information in the Watch tab of FireBug:
Object.prototype.toString = function() {
return goog.debug.reflect.typeOf(this);
};
| |