Apply your JS skills to key Mozilla projects as an MDN Fellow! http://mzl.la/MDNFellowship

mozilla
您的搜索结果

    prototype

    Summary

    The Function.prototype property represents the Function prototype object.

    Description

    Function objects inherit from Function.prototypeFunction.prototype cannot be modified.

    Properties

    Function.arguments
    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.
    Function.arity
    Used to specifiy the number of arguments expected by the function, but has been removed. Use the length property instead.
    Function.caller
    Specifies the function that invoked the currently executing function.
    Function.length
    Specifies the number of arguments expected by the function.
    Function.name
    The name of the function.
    Function.displayName
    The display name of the function.
    Function.prototype.constructor
    Specifies the function that creates an object's prototype. See Object.constructor for more details.
    Properties inherited from Object:

    Methods

    Function.prototype.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.
    Function.prototype.bind()
    Creates a new function which, when called, itself calls this function in the context of the provided value, with a given sequence of arguments preceding any provided when the new function was called.
    Function.prototype.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.
    Function.prototype.isGenerator()
    Returns true if the function is a generator; otherwise returns false.
    Function.prototype.toSource()
    Returns a string representing the source code of the function. Overrides the Object.toSource method.
    Function.prototype.toString()
    Returns a string representing the source code of the function. Overrides the Object.toString method.

    Specifications

    Specification Status Comment
    ECMAScript 1st Edition. Implemented in JavaScript 1.1 Standard Initial definition.
    ECMAScript Language Specification 5.1th Edition (ECMA-262)
    For Function instances:
    ECMAScript Language Specification 5.1th Edition (ECMA-262)
    Standard  
    ECMAScript Language Specification 6th Edition (ECMA-262)
    For Function instances:
    ECMAScript Language Specification 6th Edition (ECMA-262)
    Draft  

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support (Yes) (Yes) (Yes) (Yes) (Yes)
    Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)

    See also

    文档标签和贡献者

    标签: 
    此页面的贡献者有: ziyunfei, Oatn, teoli
    最后编辑者: ziyunfei,