Availability: |
| ||||||
JavaScript syntax: | - | import anObject.aFunction; | |||||
- | import anObject.aProperty; | ||||||
Argument list: | aFunction | A function object to imprt | |||||
anObject | An object that is exporting some property values | ||||||
aProperty | A property value to import |
ECMAScript edition 2 suggests this is a future extension. As of the third edition of the ECMAScript standard it is still denoted as a reserved word.
Navigator 4 anticipates that a future standard will endorse this capability and provides it anyway.
A layer might import a function exported by another layer so that they can exchange values or operate on one another.
The imported property name can include the wildcard asterisk character to match several properties.
This only works in Netscape 4 when the LANGUAGE attribute is set to "JavaScript1.2". Using import will affect the behavior of the == and != operators as well.
This can affect the security policy regarding the "same-signer" trustworthiness of a page.
See also: | export, Same origin, Signed scripts |
Prev | Home | Next |
ImplicitThis | Up | in |
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. |