Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : If observable = new can.Observe(foo); then Chrome shows that observable is a Constructor and can be confusing

$
0
0
I'm still confused by what you are saying.
-------------
But when we have

var observable = new can.Observe(foo);

now observable is said to be an instance of the class Constructor?  But we can't say:  observable is an instance of Constructor, or, observable is a constructor.
-----------


No, observable is an instance of can.Observe (it's proto points to can.Observe.prototype), but also an instance of can.Construct (can.Observe.prototype.__proto__ == can.Construct.prototype).


I think Chrome's tools are misleading you.  But I'm not sure .displayName is available in all browsers to correct this.





Viewing all articles
Browse latest Browse all 3491

Trending Articles