Okay, then is there a way to return an undefined object on an improper 
constructor? And I still have yet to solve the problem with values not 
being what they're supposed to be :/

On Saturday, July 20, 2013 10:40:43 AM UTC-4, Stephan Beal wrote:
>
> On Sat, Jul 20, 2013 at 3:45 PM, Richard S <[email protected]<javascript:>
> > wrote:
>
>> Hello. I've tried following along with this and the embedder's guide, but 
>> my point binding only works to an extent. The constructor works, but for 
>> some reason when I use an invalid constructor the object in JavaScript is 
>> not undefined (I set the return value to be so).
>
>
> The return value of a JS constructor is ignored - it is handled 
> automatically by the 'new' operator:
>
> [stephan@host:~/]$ cat foo.js
>
> function MyClass(){
>     return "hi";
> }
>
> var x = new MyClass();
> print(x instanceof MyClass);
> [stephan@host:~/]$ js foo.js
> true
>
>
> -- 
> ----- stephan beal
> http://wanderinghorse.net/home/stephan/
> http://gplus.to/sgbeal
>  

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to