__parent__ (Property)

A Netscape special scope chain inheritance property.

Availability:

JavaScript - 1.2
Netscape - 4.0
Property/method value type:ScopeChain object
JavaScript syntax:NmyClosure.__parent__

With the __parent__ property in Netscape, you can explicitly initialize the scope chain in your own custom functions.

Using this facility is somewhat inelegant, and since it is not portable its use is likely to be fairly restricted.

Warnings:

Example code:

   // Create an object
   var myObject = { aaa:"Some text" };
   // A fragment of script to place that object into the scope chain
   myObject.__parent__ = this.__parent__;
   this.__parent__ = myObject;

See also:__proto__, Lexical scoping, Scope, Scope chain