Ben,

Say if my class is called ValueIterator, and "it" is an instance of it, if 
I do:

> Object.prototype.toString.call(it);
[object ValueIterator]
> it instanceof ValueIterator;
(shell):1: ReferenceError: ValueIterator is not defined
it instanceof ValueIterator;
              ^
ReferenceError: ValueIterator is not defined
    at (shell):1:15


On Thursday, June 26, 2014 9:12:09 PM UTC-7, Ben Noordhuis wrote:
>
> On Thu, Jun 26, 2014 at 6:48 PM, Jane Chen <[email protected] 
> <javascript:>> wrote: 
> > I have an object instantiated from a template, which has a class name 
> set. 
> > When I do instanceof on it in JavaScript, it only shows it's an object, 
> but 
> > not of my class.  My class seems unknown.  Does v8 provide a callback 
> API 
> > for instanceof?  Or object is the best you can get? 
>
> You mean `(new YourClass instanceof YourClass) === false`?  What does 
> `Object.prototype.toString.call(new YourClass)` print? 
>

-- 
-- 
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/d/optout.

Reply via email to