Allows a script to import properties, functions, and objects from a signed script that has exported the information. This feature is not in ECMA 262, Edition 3.
import objectName.name1, objectName.name2, ..., objectName.nameN;
- Name of the object that will receive the imported names.
- Property, function, or object to be imported.
objectName parameter is the name of the object that will receive the imported names. For example, if
p have been exported, and if
obj is an object from the importing script, the following code makes
p accessible in the importing script as properties of
import obj.f, obj.p;
The first syntax imports the specified properties, functions, and objects from the exported script.
The second syntax imports all properties, functions, and objects from the exported script.
Typically, information in a signed script is available only to scripts signed by the same principals. By exporting (using the
export statement) properties, functions, or objects, a signed script makes this information available to any script (signed or unsigned). The receiving script uses the
import statement to access the information.
The script must load the export script into a window, frame, or layer before it can import and use any exported properties, functions, and objects.