Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

How to check whether a class derives from another class?

$
0
0

@ctusch wrote:

Hey :smile:

I'm trying to detect whether a class which is unknown at runtime derives from a certain base class. The obvious way didn't work:

if (SomeClass.prototype === BaseClass) {
    // do stuff
}

How would I do this in Ember?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles