Re: [JSON] Changing the class of an object after its construction
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: [JSON] Changing the class of an object after its construction

From: Martin Honnen <mahotrash@yahoo.de>
Date: Sun Nov 20 2005 - 19:29:10 CET

Raphael Jolivet wrote:

> "obj1.__proto__ = new myClass()" works well.

> __proto___ was what I looked for.

But be aware that only the Spidermonkey engine used in Mozilla and
Netscape browsers exposes that __proto__ property, other engines
implementing ECMAScript as the MS JScript engine or the engine used in
Opera do not expose that so using it in script on the web is not cross
browser.

-- 
	Martin Honnen
	http://JavaScript.FAQTs.com/
Received on Mon Nov 21 03:36:50 2005