Interface JSFunctionFunctions

All Superinterfaces:
JSObjectFunctions
All Known Subinterfaces:
JS5FunctionFunctions
All Known Implementing Classes:
JS5Function, JSFunction

public interface JSFunctionFunctions extends JSObjectFunctions
  • Method Details

    • apply

      JSObject apply(JSObject thisObject, JSArray argArray)
      function apply (thisObject, argArray) invoke a function as a method of an object.

      Example

      //Apply the default  Object.toString() method to an object that
      //overrides it with its own version of the method
      Object.prototype.toString().apply(o);
      
      Parameters:
      thisObject - The object to which the function is applied.
      argArray - An array of arguments to be passed to function
      Returns:
      Whatever value is returned by function
      Since:
      Standard ECMA-262 3rd. Edition, Level 2 Document Object Model Core Definition.
      See Also:
    • call

      JSObject call(JSObject thisObject, JSObject args)
      function call (thisObject, args) invoke a function as a method of an object

      Example

      //Call the default  Object.toString() method to an object that
      //overrides it with its own version of the method
      Object.prototype.toString().call(o);
      
      Parameters:
      thisObject - The object to which the function is applied.
      args - An array of arguments to be passed to function
      Returns:
      Whatever value is returned by function
      Since:
      Standard ECMA-262 3rd. Edition, Level 2 Document Object Model Core Definition.
      See Also: