Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Documentation for Function is Still Containing incorrect Info

16 views
Skip to first unread message

Masquerade

unread,
Aug 18, 2012, 5:06:04 AM8/18/12
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.

Tom Schuster

unread,
Aug 18, 2012, 6:17:48 AM8/18/12
to Masquerade, dev-tech-...@lists.mozilla.org
Looks like there was still some small bug on MDN. I think I fixed it now.
> _______________________________________________
> dev-tech-js-engine mailing list
> dev-tech-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
0 new messages