On Sun, Mar 29, 2009 at 1:41 PM, <[email protected]> wrote:
> will output "[object object]" or something. But how can I intercept
> this so that it outputs the my own string instead?
Hi!
Simply set:
test.toString = function() { return "[object MyType name="+this.name+"]";}
for purposes of print(), you never need to explicitly call toString()
- that will happen automatically.
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---