Masquerade
unread,Aug 18, 2012, 5:06:04 AM8/18/12You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Comment on latest update (Aug 17, 2012)
First it is best to illustrate with some test code done on firefox 14:
ar=Object.getOwnPropertyNames(Function);
alert(ar);
ar=Object.getOwnPropertyNames(Function.prototype);
alert(ar);
fobj();
function fobj() {
ar=Object.getOwnPropertyNames(fobj);
alert(ar);
alert(Function.prototype.isPrototypeOf(fobj));//true
}
So, we can compare what properties (non-inherited) each object has:
Function constructor:
prototype, length ,name, arguments, caller
Function.prototype:
constructor, toSource, toString, apply, call, bind, isGenerator, length, arguments, caller
ordinary function objects
prototype, length ,name, arguments, caller
As evident from the test code, an ordinary function object created by the function keyword does has its own non-inherited properties (prototype, length ,name, arguments, caller) and so does the global Function
(since it is just another function) but these are not described in the documentation.
The Function.prototype does has a lot of properties/methods (constructor, toSource, toString, apply, call, bind, isGenerator, length, arguments, caller) but the current documentation only describe some of them (the methods apply, call, bind, isGenerator, toSource, toString) but constructor, length, arguments, caller are not covered.