There are occasional namespace conflicts when using applets. Public properties are created in a different environment, but are published into the JavaScript namespace and take precedence over the properties of the containing JavaScript object.
The problem is exhibited when the name of a public property collides with a property of the containing JavaScript object instantiated by the <APPLET> HTML tag. Access to the property belonging to the containing object is difficult because the scope search order will obtain the public property of the applet first. By using the object property, you can access the containing object explicitly and retrieve a property of that object even if there is an identically named property belonging to the enclosed Applet object.
This access mechanism applies to method invocations as well.
See also: | OBJECT.object |
Prev | Home | Next |
Applet.name | Up | Applet.src |
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. |