The object referred to by the left operand is examined, and its type compared with the type of the object on the right. The object on the right should be an object with a constructor (that is, a class object) although this likely works with instances as well if they also have constructors inherited.
The ECMA standard (second edition) reserves this keyword for future use in anticipation of the JavaScript 1.4 implementation. That means that a compliant implementation does not need to support this feature.
This operator yields the true value if both objects are of the same class, otherwise it is false.
Use with caution. Be aware that there are some bugs in the class instantiation of some objects in Netscape and MSIE. This may always not yield true when you expect it to.
This is not available for use server-side with Netscape Enterprise Server 3.
See also: | Reserved word |
Prev | Home | Next |
Instance variable | Up | Instantiating Function |
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. |