export

Did you know that you can read content offline by using one of these tools? If you would like to read offline MDN content in another format, let us know by commenting on Bug 665750.

Dash App
  • Tags
  • Files

 

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.

Version Information

Statement
Implemented in: JavaScript 1.2, NES 3.0

Syntax

export name1, name2, ..., nameN;

export *;

Parameters

nameN
Property, function, or object to be exported.

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.

See also

import