Global code is that source text that is outside of all function declarations.
On initialization of some global code into an execution context, the scope chain is initialized to only contain the global object and nothing else.
Variable instantiation is performed using the global object as the variable object and with empty property attributes.
The this value is set to point at the global object.
See also: | Executable code, Execution context, function( ... ) ..., Script |
ECMA 262 edition 2 - section - 10.1.2
ECMA 262 edition 2 - section - 10.2.1
ECMA 262 edition 3 - section - 10.1.2
ECMA 262 edition 3 - section - 10.2.1
Prev | Home | Next |
GetValue() | Up | Global object |
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. |