Core JavaScript 1.5 Reference:Statements:export
From MDC
Contents |
[edit] Summary
Allows a signed script to provide properties, functions, and objects to other signed or unsigned scripts. This feature is not in ECMA-262, Edition 3.
| Statement | |
| Implemented in: | JavaScript 1.2, NES 3.0 |
[edit] Syntax
export name1, name2, ..., nameN;
export *;
[edit] Parameters
-
nameN - Property, function, or object to be exported.
[edit] Description
Typically, information in a signed script is available only to scripts signed by the same principals. By exporting properties, functions, or objects, a signed script makes this information available to any script (signed or unsigned). The receiving script uses the companion import statement to access the information.
The first syntax exports the specified properties, functions, and objects.
The second syntax exports all properties, functions, and objects from the script.