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
You really need to focus on the documentation and less the name of things that chrome's debugging tools are guessing at naming. 

It's Constructor to imply that the functions returned by can.Construct are constructor functions. 

It's impossible AFAIK to have a constructor generator like can.Construct programmatically set the name of the constructor function. 

We all understand JS, examples with Person = function(){} are not needed except ...

It's probably useful to make sure you understand the problem. 

When JS runs something like:

Person = function(){}

Person is just a reference. I could do

Dog = Person  

On the next line. If I did:

var d = new Dog()

What would it show for d?

Until something like displayName is standard, the ONLY way to make something like this work is eval. 

Sent from my iPhone

On Apr 10, 2013, at 11:21 PM, JavaScriptMVC Forum <noreply@zohodiscussions.com> wrote:


Viewing all articles
Browse latest Browse all 3491

Trending Articles