Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

2.4.4.3 The [[Get]] (P) Method of a Function Object

Assume F is a Function object.

When the [[Get]] method of F is called with value P, the following steps are taken:

1. If P is not the string 'arguments' then go to step 6.

2. If an active execution context for F does not exist, go to step 13.

3. Let X be the most recently created active execution context for F.

4. If X is marked as having a partially accessible arguments object, let A be the original arguments object for X; otherwise, let A be the value of the property named 'arguments' of X's variable object.

5. Return A.

6. If P is not the string 'caller', go to step 13.

7. Let X be the most recently created active execution context for F.

8. If X does not have an execution context to which it could normally exit, return null.

9. Let R be the execution context which would become the current execution context if X exited normally (not via an exception).

10. If R is an execution context for a built-in function or a host object function, return null.

11. If R is an execution context for global code or for eval code, return null.

12. R must be an execution context for function code, so return the function object with the call that caused R to be created.

13. Return the result of calling the default [[Get]] method ([ECMA-262-1999] section 8.6.2.1) passing P as the argument.

Note: JScript 5.x under Internet Explorer 9 marks the current execution context as having a partially accessible arguments object when the function's FormalParameterList contains the name 'arguments' or the function's FunctionBody contains a direct reference to the function's original arguments object or the function's FunctionBody contains a direct call to eval.

JScript 5.x under Internet Explorer 7 or 8 marks the current execution context as having a partially accessible arguments object when the function's FormalParameterList contains the name 'arguments'.

Show:
© 2016 Microsoft