Function code is the script source text that appears between the braces in a function declaration.
This could also fall under the heading of eval code if the function is being declared as a component within some script source text that has been passed to the eval() function for processing.
Function code initializes the scope chain to include its activation object followed by the global object.
Variable instantiation is performed using the activation object as the variable object and any initial variables are flagged with a DontDelete attribute.
The caller provides the this value but in some situations the value null may be passed. In that case, the global object will be used in its place.
ECMA 262 edition 2 - section - 10.1.2
ECMA 262 edition 2 - section - 10.1.6
ECMA 262 edition 2 - section - 10.2.3
ECMA 262 edition 2 - section - 13
ECMA 262 edition 3 - section - 10.1.2
ECMA 262 edition 3 - section - 10.1.6
ECMA 262 edition 3 - section - 10.2.3
ECMA 262 edition 3 - section - 13
Prev | Home | Next |
Function call operator ( ) | Up | Function definition |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |