Core JavaScript 1.5 Reference:Global Objects:Function:prototype
From MDC
Contents |
[edit] Summary
Represents the Function prototype object.
[edit] Description
Function objects inherit from Function.prototype. Modifications to the Function.prototype object are propagated to all Function instances.
[edit] Properties
- arguments
- Deprecated
- An array corresponding to the arguments passed to a function. This is deprecated as property of
Function, use the arguments object available within the function instead.
- arity
- Deprecated
- Specifies the number of arguments expected by the function. Use the length property instead.
- caller
- Non-standard
- Specifies the function that invoked the currently executing function.
- constructor
- Specifies the function that creates an object's prototype.
- length
- Specifies the number of arguments expected by the function.
- name
- Non-standard
- The name of the function.
[edit] Methods
- apply
- Applies the method of another object in the context of a different object (the calling object); arguments can be passed as an Array object.
- call
- Calls (executes) a method of another object in the context of a different object (the calling object); arguments can be passed as they are.
- toSource
- Non-standard
- Returns a string representing the source code of the function. Overrides the Object.toSource method.
- toString
- Returns a string representing the source code of the function. Overrides the Object.toString method.
- valueOf
- Returns a string representing the source code of the function. Overrides the Object.valueOf method.
Methods inherited from Object.prototype
__defineGetter__, __defineSetter__, hasOwnProperty, isPrototypeOf, __lookupGetter__, __lookupSetter__, __noSuchMethod__, propertyIsEnumerable, unwatch, watch