With the __proto__ property in Netscape, you can explicitly initialize the prototype inheritance chain in your own custom constructors.
It is unclear whether this property will be added to the ECMA standard. For now it is only available in Netscape.
// Create a cuboid object var AAA = { length:100, width:200, height:300 }; // Create a cuboid that shares the height value var BBB = { length:50, width:100, __proto__:AAA };
See also: | __parent__, Subclasses |
Prev | Home | Next |
__parent__ | Up | ` (Backquote) |
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. |